COMP1405A/1005A “Introduction to Computer Science I” Assignment 1 of 6 solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

Rate this product

For this assignment, you will 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.
Do not attempt reproduce the cartoon included above. Your cartoon must be original (i.e., it
must have been created by you and you alone) and it must meet the requirements detailed
on the following page.
Although you will not submit your rough work, if you visit the instructor or a teaching
assistant you will be expected to present an original image of what you are planning to draw
before you will receive any assistance with the syntax. Consider using graph paper for this.
COMP1405A/1005A (Fall 2019)  “Introduction to Computer Science I”
Specification for Assignment 1 of 6
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
In the interest of clarity, please understand that you will be uploading ONLY a single file
containing a program written in Python 3 (named ‘comp1405_f19_#########_a1.py’)
and NOT an image file named “house_#########.bmp”. Your Python program must
CREATE the image file when the teaching assistant runs the program in order to mark it, but
you do not submit an image file for this assignment.
You will need to SEARCH the pygame documentation YOURSELF to determine how to save
an image file. You will also need to review the following pygame library documentation for
details about the requirements of each of these functions you will require:
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
This program (along with any other program submitted in this class) must be a completely
original work, authored by you and you alone, prepared for this offering (i.e., Fall 2019) of
COMP1005/COMP1405. Do not discuss this assignment with anyone except the instructor
or the teaching assistants, and do not copy images or source code samples from the internet
or any other source.