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¶

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.

  1. Add several if and elif statements in modulus_animation.py so that it draws a little animation of your choosing.

  2. 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.

Creative Commons License

Adapted for Python from Graham Mitchell’s Programming By Doing