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
Answered by Matthew M. Python tutor

4221 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Creating string from multiple strings(or characters)


[Exam style] Python is an interpreted language. Explain what this means and how interpreted languages differ from compiled languages.


Write a function that takes a string, and outputs that string formatted in camelcase. (alternating upper and lower case for each character, e.g. cAmElCaSe)


Create a program that takes in two numbers and returns the highest of the two


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences