Implement a rocket launch countdown.

To do this we would create a function with a simple loop that iterates downwards and prints the numbers downwards. Then at the end of the loop we would simply print 'blast off'.def countdown (n): while n > 0: print (n) n = n - 1 print ("blast off")

Answered by Matthew M. Python tutor

3128 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Make a program that asks the user for a series of numbers until they either want to output the average or quit the program.


Why are negative indexes used?


Demonstrate a recursive solution to calculate the factorial of a number


How do I use format python code?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy