June 2021
Beginner
432 pages
9h 9m
English
This program displays a message of the user’s choice in a wavy pattern as the text scrolls up. It accomplishes this effect with math.sin(), which implements the trigonometric sine wave function. But even if you don’t understand the math, this program is rather short and easy to copy.
When you run sinemessage.py, the output will look like this:
Sine Message, by Al Sweigart al@inventwithpython.com (Press Ctrl-C to quit.) What message do you want to display? (Max 39 chars.) > I <3 Programming! I <3 Programming! I <3 Programming! I <3 Programming! I <3 Programming! I <3 Programming! I <3 Programming! I ...Read now
Unlock full access