Challenge
Countdown with holds
Print a launch countdown from T-10 to T-0 with range(10, -1, -1), adding a hold line at every second listed in holds, then scrub the launch at a given second with break, or print Liftoff! at the end.
9 results
Challenge
Print a launch countdown from T-10 to T-0 with range(10, -1, -1), adding a hold line at every second listed in holds, then scrub the launch at a given second with break, or print Liftoff! at the end.
Challenge
…instead of a number typed by hand, then turn it into a countdown() that counts up with T+ after launch.
Quiz
…going until something changes: the fuel runs out, the countdown hits zero, the right signal arrives. This free quiz has 15 short questions that check you can tell when a while loop stops, and when it…
Quiz
Free Python quiz for beginners: 20 multiple-choice questions on print(), strings, lists, dictionaries, loops and functions, with instant answers.
Example
Parameters sep and end let you control separator and line ending in print function.
Article Python Fundamentals
…function that rejects negative numbers and asks again. 2. Countdown Write countdown(start) that prints the numbers from start down to 1, followed by "Liftoff!". Then add a second parameter for that…
Quiz
…for every item: every planet in a list, every second of a countdown, every letter in a word. This free quiz has 15 short questions that check you can predict how many times a loop runs and what it…
Quiz
…does this code print? What does flush=True do in print("Countdown...", flush=True) ? What does this code print? Given speed = 7.6589 , which lines print Speed: 7.66 km/s ? What does this code print?…
Article Python Fundamentals
…begins here! Practice Missions Create a rocket launch countdown Display a formatted table of planet temperatures Create a space mission log with timestamps