Question: Design an algorithm for drawing a cartoon house and then you will create a Python 3 program that implements your algorithm using only the pygame
Design an algorithm for drawing a cartoon house and then you will create a Python 3 program that implements your algorithm using only the pygame library. The requirements are detailed on the following page, but as a clarifying example you may consider the image included below, which was created using only polygons, rectangles, and circles.
Your cartoon must meet the following requirements:
a) it must import the pygame library (and only the pygame library)
b) it must be a depiction that includes at least1 a house, a tree, a door, and a window
c) it must be drawn within a pygame window of size 500 500
d) it must remain on the screen for 3 seconds
e) it must be saved to a file named "house_#########.bmp" 2
f) it must use the fill function to change the background colour
g) it must call the pygame.draw.polygon function at least three times
h) it must call the pygame.draw.rect function at least twice
i) it must call the pygame.draw.circle function at least once
j) it must call the pygame.draw.ellipse function at least once
k) it must use at least 7 different colours3 from www.computerhope.com/htmcolor.htm4
l) the name5 and RGB values of each colour must appear as comments in your code
m) every drawn element (i.e., rect, circle, etc.) must be accompanied by a comment
1 it may include additional elements if you wish
2 replace the number signs with your nine-digit student number
3 including the background colour (i.e., background colour plus six other colours)
4 each colour you use must appear in the list on that website
5 the name of each of the colours must match the name that appears on the site provided
Review the following pygame library documentation for details about the requirements of each of these functions:
https://www.pygame.org/docs/ref/display.html
https://www.pygame.org/docs/ref/surface.html
https://www.pygame.org/docs/ref/rect.html
https://www.pygame.org/docs/ref/draw.html
https://www.pygame.org/docs/ref/time.html
https://www.pygame.org/docs/ref/image.html
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
