CSC111 Homework 11 2014

From dftwiki3
Revision as of 07:22, 17 April 2014 by Thiebaut (talk | contribs)
Jump to: navigation, search

--D. Thiebaut (talk) 21:28, 15 April 2014 (EDT)


Page under construction!

UnderConstruction.jpg


CSC111 HappyEaster.png


Problem 1


You have been hired for the summer by a company that makes wrapping paper. The company has a Web form where customers can pick different colors, a general theme, and a message to print in the middle of the page. Then a Python program generates an image that is printed by a large format printer.

The image above shows one particular output, for somebody who has selected Cars as the theme, Yellow as the background, and "Happy Easter" as the message.

Your assignment


You must write a program that generates a sample output, with a predefined color, a predefined scheme, and a predefined message. Your program will NOT ask the user for any information.


Submission


You must submit 2 files:

  • Your program, which should be called hw11a.py
  • An image of the output generated by your program. It should be called sheet.png or sheet.jpg


Requirements

  • Your program should print rows of cars. The color of the cars should be randomly generated.
  • Your program uses the same car for each row (the image above shows an output of the optional and extra-credit program)
  • You are free to pick the shape of your car. It must have at least 2 rectangles and at least two wheels. You pick the shape that you like.
  • A given car can have differently colored rectangles, or the same color for all its rectangles. You decide.
  • Cars are allowed to extend past the boundaries of the window.
  • The