CS 111 - PROGRAM DESIGN I, Spring 2018
Lab Assignment 10
Due: Wednesday, 4/4/2018 by 11:59 pm
For this lab, we want to take some existing
functions that were written during lecture and use them together to create a new different result than for which they were originally being used.
We want to use the following functions:
The primary task of this lab will be write the main() function that will call the above functions in the proper way to get the desired effect.
Step 1: Get the picture blue-mark.jpg from the computer.
Step 2: Crop the picture to get just the head of person from the blue-mark.jpg picture. Use the coordinates that were used in the lecture example contained in
lect0322.py
Step 3: Posterize the cropped result from
Step 2 using the modPicture() function from
lect0301d.py The posterize function does a 4 color posterization using the colors of blue, red, green and yellow.
Step 4: Create a horizontal collage of the posterized result from
Step 3 so the picture appears 3 times using the
makeCollageHorz() function from
lect0322a.py
The picture you are to start with is
After the crop using coordinate of (263, 161) for the upper left corner and the coordinate of (383, 304) for the lower right coordinate, you should get the result of:
After the posterize, you should get the result of:
After making the collage, you should get the result of:
You code should be written in the python program named
NetIDLab8.py that will contain a function named main( ) that will do the following:
-
Print out your name and your net-id
- Prompt the user to select the blue-mark.jpg picture from the local computer
- Do the described operations above to create the cropped, posterized and repeated result
- Save the resulting picture to a file on the local machine
- You must write your programs using good programming style which includes:
- Good variable names
- in-line commenting
- header block commenting for the program and each method written
Be sure to include the following with the header block comment for the program.
- your name
- day and time of your CS 111 lab section (i.e. Monday at 2:00)
- A description of the project.
- proper indentation of program statements
- use of blank lines to separate blocks of code
How assignments should be submitted
You are to submit your program electronically using the link for Lab 10 on the Assignments Page in Blackboard.