The Digital World-Lab 6


Assigned: March 9
Due: March 16

In this lab you are to write two python programs: one to modify an image (rotating it 90 degrees), another to create a synthetic image.  Each .py file should have the same structure:  a function that takes a parameter and returns a picture, followed by a function that interacts with the user and displays the picture.   The program posted on the course web page for scaling a picture up and down should serve as a model.  The detailed requirements are given in each problem.

1. Write a program that prompts the user to select an image file, and then displays it rotated 90 degrees clockwise.





NOTES:
2.  Write a program that displays a picture of a yellow square in the center of a red one.  The first function should have two parameters:  The length of a side of the red square, and the length of the side of the yellow square, and it should return a picture.  The second function should prompt the user for the two side lengths, and display the result.  You might begin by making a square that's completely red, and then looping over a range to create the yellow square.  Use the program setCenterWhite2.py as a model for how to do the looping to make the center square, but remember that the program you write will have quite a different structure.



Both the programs you write should include comments that contain, first, your name, and second, a description of what the program does.