CSC111 Lab 8

From dftwiki3
Revision as of 10:37, 24 March 2010 by Thiebaut (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.