Starting from:

$30

IT210- Fundamentals of Programming Lab 2 Solved

Write a program that implements Graphics P2.27 in your text on page 83. The code below should get you started. If you

"oose to make the drawing a different size, feel free to change constants in the code. You will need to place the graphics.py file (available on D2L in the Syllabus, Notices & Grades folder) in the same folder as your program.

# Your Name

# Draw a house.

# import necessary graphics functionality provided by the authors from graphics import GraphicsWindow

# Create the graphics window named win win = GraphicsWxndow (400, 400)

# Create a canvas we can draw on canvas win. canvas ( )

# Draw the house. Change this if you want to draw a different style house canvas . setC010r ( " red" ) canvas. drawRect (100, 150, 200, 200)

# Add your python code to complete the house drawing here. . .

# This statement will make the window stay open until its " close " button is clicked win. wait()

The above comments and additional similar comments should be part of your submitted code.

The drawing below is a simple, minimally acceptable drawing. You may and probably should make yours more elaborate.

More products