Conditionals can also be used to cycle through the frames of an animation. For example, to animate a person running you could simply move an image of a person. However, the visual is enhanced if you swap to a different image at each frame, giving the illusion of actual running. In this post-lab you will demonstrate your understanding of conditionals and animation by creating a simple animation of a character running.
Details
Create a function called animate_running()
in a file
called running.py. The function should use the graphics
module to create an animation of a character running. The animation
should alternate between the two images below while moving the
character to the right. The character can start and end at any
location and move at any speed.
Test your animation and make sure you follows the course's code conventions.
Example
$ python3 running.py
Submission
Submit your program as a .py file on the course Inquire page before class on Monday September 29th.