Comp 151 Project 6: Simple Algorithms
Due:
Thursday
Nov 17th
Friday Nov 18th at 11:59pm
Summary: You
will practice the simple algorithms that we've looked at in class in a
project. (the game style project will make a return later in the
semester). You'll also get a better appreciation for the need of
commenting
Description
You will need the Zelle graphics library for this one
Your program needs to do the following(note that I'm giving you more
flexibility in deciding how to implement this one):
Create a new project with your name as part of the project name (eg:
jsantoreProject6)
Grab
this new version of the Demo.txt It
contains project 4-like descriptions of a series of ovals, circles and
rectangles
- Pop up a window not less than 700x700 pixels (and not more than a
standard 1080p widescreen monitor)
- create a list of graphics objects from as many lines as there are in
the demoP6.txt (I will add line to this file when I grade them so make
sure to handle every line in the file)
- make the shape with the largest area travel horizontally across the
screen. Make sure it doesn't go off the window. Either have it wrap
around or start moving in the other direction when it hits the edge of
the screen.
- Make the shape with the mean (average) area travel vertically across
the screen (with the same constraints as the horizontally moving one
above)
- Put the shape with the smallest area in the middle of your window.
- put the shape with the median area in the upper left of your window.
- yes this means you will have to sort.
- make sure all shapes are colored with a *random*
color (you can choose from a list of at least 10 if you wish.)
Additional Requirements:
Your functions must contain all of your code
except the one line invoking the main function.
You can use your solution to project 4 as a
jumping off point if you wish.
all of your functions must be 20 lines long or
less
To help me identify your work, put your name in the name of your program
file and project as usual.
be sure to submit the entire project folder
including the demo file.
Comment your code. include the usual
put the following at the beginning of the program as a comment:
- Your name
- anything that was left undone
- anything that I need to know to run the program correctly.
Submission:
zip the entire folder up again this time - there
will be images as well as python code.
Submit the zip file of the lab via blackboard as
usual. Don't forget to make sure your file has you name in the file name.