Part 9 - More Functions

In this section you will get another look at creating your own functions. You will use functions to help with mathematical computations, and also use functions to draw custom made graphics at any location you wish.

What to do/hand in?

1. Read and work through "Part 9 - Functions". The first two questions in Part A involve making functions to draw graphics within PyGame. Use the graphics template that you have in order to complete these two questions. The rest in Part A involve making functions that do not use the graphics library. Complete Part B and C.

2. Attempt to guess what the output for the examples in section 9.10 will be. There are answers below.

3. Complete the Part 9 - Worksheet

4. Take your animation program from Part 8 and put the draw code of at least 2 pictures into a function. For a challenge, try to make a function to draw one of the animated portions of your program that accepts an x and y value as parameters.

Submit:

1. Chapter 9 Worksheet

2. Animation Function.py as per Part E

Part 9 - Functions.pdf
Answers to 9.10.pdf