Comp 151 Project 7: Simple Algorithms
Due: Wednesday Nov 18th at
11:59pm
Summary: You
will practice the simple algorithms that we've looked at in class in a
project. (the 'space invaders' style project will make a return after
this)
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:
jsantoreProject3)
Grab
this zip file of gif images from
the Wesnoth game and others (under a generous use license) and put the
resulting folder of images into your project directory.
- Pop up a window not less than 500x500 pixels
- create a list of graphics.Image objects from all of the images in
the SampleProjectGifs subfolder
- make the image 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 sure you determine the largest in your program and not just
by opening the images. If I add a new largest image to the folder
when I grade it, your solution should still work
- Make the image with the mean (average) area travel vertically across
the screen (with the same constraints as the horizontally moving one
above)
- make sure you determine the average in your program and not just
by opening the images. If I add a new largest image to the folder
when I grade it your solution should still work
- put the image with the smallest area in the middle of your window.
- same limits as the largest images above.
- put the image with the median area in the upper left of your window.
- yes this means you will have to sort.
Additional Requirements:
Your functions must contain all of your code
except the one line invoking the main function
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 all subfolders of images.
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.