CSSE 120 -- Intro. to Software Development

Homework 7

  1. Complete the assigned reading for the next session (Zelle sections 6.5-6.7, 7.1-7.3 ).
  2. (24 Points) Complete the Angel quiz over this reading. You'll find this on the course Angel page,
    under Lessons → Homework → Homework 7 → More Functions, Decision Structures
  3. (10 Points) Finish the exercise you started in class: distance.py, and commit your work using Subclipse.

    A reminder on how to commit:

    1. Make sure you are using the PyDev perspective.
    2. Right click the project or module you would like to commit back to the repository.
    3. Click on TeamCommit
    4. Add an appropriate Commit message then click on the OK button.
For #4 and #5, you will need to use the Session07 project that you checked out in class today using Subclipse.
  1. (40 Points) Function versions of pizza, polygon, and star.  Place all of your function definitions in one Python source file, pizzaPolyStar.py, already in the Session07 project.

  2. (40 Points) Create a function called circleOfCircles that takes five parameters and draws N circles whose centers are equally spaced around a (usually) larger circle.  Do not actually draw the circle that they are spaced around.  Parameters:
    1. a GraphWin object where it will do its drawing.
    2. N, the number of circles to draw.
    3. A Point that is the center of the "big" circle that the other circles surround.
    4. The radius of the "big" circle.
    5. The radius of the small circle.

    You should be able to create some interesting patterns by calling your function with various parameters (in a 1000 by 1000 window). You might try (one at a time) the examples are below, along with output from the first one.

    Commit your Session07  project, with an appropriate comment, to your repository.

  3. More Python culture: What's up with the shrubbery examples? Check out this visit of King Arthur to the Knights Who Say “Ni!”.