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

3876 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Give an example of a FOR loop


What are the main data structures that I can use in Python


What is the difference between a for loop and a while loop?


How would you loop over every key and value in a python dictionary?


We're here to help

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