Difference between revisions of "CSC111 Lab 8"
(Created page with '<bluebox> This lab deals with the moving ball example we saw in class recently. Your work for today is to add new functionality similarly to the way we added functionality to th…') |
(→Moving Ball, Part 1) |
||
Line 11: | Line 11: | ||
* Run the program and make sure it works. | * Run the program and make sure it works. | ||
− | ;Question 1 | + | :;Question 1 |
− | : Clean up the testing of x and y coordinates of the center, in the function '''simul()''', so that it is simpler. Use '''AND''' or '''OR''' to simplify the testing. | + | :: Clean up the testing of x and y coordinates of the center, in the function '''simul()''', so that it is simpler. Use '''AND''' or '''OR''' to simplify the testing. |
Revision as of 10:37, 24 March 2010
This lab deals with the moving ball example we saw in class recently. Your work for today is to add new functionality similarly to the way we added functionality to the graphics example with buttons.
You should start the Mac in Mac OS mode for today (graphics is more easily done this way). Make sure you start the X11 utility first, then the Terminal window.
Moving Ball, Part 1
- Create a program called movingBall.py, which contains the version we ended up in class yesterday. It is available here.
- make sure the graphics.py library is in the same directory where your program is located.
- Run the program and make sure it works.
- Question 1
- Clean up the testing of x and y coordinates of the center, in the function simul(), so that it is simpler. Use AND or OR to simplify the testing.