The crew wants a picture of a rocket on the welcome screen, but nobody has a drawing program at Mission Control. Rocket looks at his loops and has an idea.
"What if the loop draws the picture?" he says. "One row at a time, with stars and spaces."
Raven sketches a small triangle on graph paper and counts the squares. "What do you notice?" she asks. "Each row has two more stars than the row above, and one less space in front."
Nova draws the triangle in glowing dots, row by row. "I found a pattern," she says. "When you can describe a row with the row number, a loop can draw it."
Rocket writes the row rule in his notebook before writing any code.
# nose_cone.py
for row in range(1, 5):
spaces = " " * (4 - row)
stars = "*" * (2 * row - 1)
print(spaces + stars) * *** ***** *******
Wonderful work. Next week you will keep many values together in lists and dictionaries.