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")

MM

Related Python Mentoring answers

All answers ▸

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


Create an rock, paper, scissors game. The user should input one option, and the computer should play randomly.


How could I write a program to convert Km/h to m/s in python


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