< Back

Post Lab 12

Post labs are to be done individually. Sharing files between students is not allowed. Doing so is an Academic Integrity violation, and will be treated as such.


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.

Character Standing While Facing Right Character Running While Facing Right

Test your animation and make sure you follows the course's code conventions.

Example

$ python3 running.py

Submission

Submissions for post labs are to be done via the inquire system. Go to http://inquire.roanoke.edu/ You should see a section for post labs. Submit your .py file to the appropriate post lab location.

Post labs are to be done individually. Sharing files between students is not allowed. Doing so is an Academic Integrity violation, and will be treated as such.