June 2021
Beginner
432 pages
9h 9m
English
Rainbow is a simple program that shows a colorful rainbow traveling back and forth across the screen. The program makes use of the fact that when new lines of text appear, the existing text scrolls up, causing it to look like it’s moving. This program is good for beginners, and it’s similar to Project 15, “Deep Cave.”
Figure 58-1 shows what the output will look like when you run rainbow.py.
Figure 58-1: The zigzag output of the rainbow, which is in color on the screen
This program continuously ...
Read now
Unlock full access