Modulus Animation¶
In this program, you’ll use a loop to draw a simple ASCII-based
animation on the screen, and you will use modulus (%
) to
determine which frame of the animation to show. (You will learn how to
create your own loops later.)
Files Needed¶
modulus_animation.py
- modify this. It is the base-template.
modulus_animation_worm.py
- first example
modulus_animation_symbols.py
- second example
Name your file:
modulus_animation.py
What You Should See¶
If you download and run modulus_animation_worm.py
it will look roughly like this, but bouncing back and forth.
********
What You Should Do on Your Own¶
Assignments turned in without these things will receive no credit.
Add several
if
andelif
statements inmodulus_animation.py
so that it draws a little animation of your choosing.You must have a minimum of eight (8) different frames of animation, and it must loop smoothly.
©2021 Daniel Gallo
This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.
Adapted for Python from Graham Mitchell’s Programming By Doing