Lab 3: Drawing with FunctionsΒΆ
Draw and animate an image. Update your program from Lab 2, or create a new program. Lab is worth 20 points, see the breakdown below.
Incorporate the following items:
- Start with the same PyCharm project you used for Lab 01 and Lab 02. Create a new folder for Lab 03. Feel free to use any code from Lab 02 you want, just copy it across. Do not create a new repository. Do not create a new code branch. Just create a directory for Lab 3. Make sure it is not inside of th folders for Lab 01 or Lab 02.
- Create three functions that draw something. (15 pts total, up to 5 pts
per function)
- Define the function and successfully call it. (1 pt)
- Make your drawing function complex. 0 points for a one-line function that just draws a rectangle, 0 points for copying the example from the book, 2 points for a cohesive multi-line function. (2 pts)
- Pass in
xandyparameters and successfully position the object. (2 pts)
- Properly use the
mainfunction for your main program as shown in 3.5 Make Everything a Function. (1 pt) - Animate the object as shown in this bouncing rectangle example. (4 pts)