Exercise 05-03:

Make a program to write the countdown of a rocket launch. The program must print 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, and Fire! on the screen.

Answer:

##############################################################################
# Python From Scratch
# Author: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2025 - LogiKraft 2025
# Site: https://pythonfromscratch.com
# ISBN: 978-85-7522-949-1 (Paperback), 978-85-7522-950-7 (hardcover), 978-85-7522-951-4 (ebook)
#
# File: chapter 05/exercise-05-03.py.py
##############################################################################
x = 10
while x >= 0:
    print(x)
    x = x - 1
print("Fire!")
Click here to download the file