Question: # background and environment sky = Rect ( 0 , 0 , 4 0 0 , 2 5 0 , fill = gradient ( '
# background and environment
sky Rect fillgradientlightBlue 'burlyWood', start'top'
ground Rect fill'lemonChiffon'
path Polygon fill'navajoWhite'
windows Group
door Group
def drawWindowx y x y:
# Use a line to create the brown window panes and add it to the
# windows group.
### Place Your Code Here ###
pass
def drawAllWindows:
# bottom windows
Rect fill'peru', border'brown'
drawWindow
drawWindow
Rect fill'peru', border'brown'
drawWindow
drawWindow
# top windows
Rect fill'peru', border'brown'
drawWindow
drawWindow
Rect fill'peru', border'brown'
drawWindow
drawWindow
Rect fill'peru', border'brown'
drawWindow
drawWindow
windows.toFront
def drawDoor:
# Add the rectangular door to the door group.
### Place Your Code Here ###
door.toFront
Line fill'sienna'
Line fill'peru', lineWidth dashes
Line fill'peru', lineWidth dashes
def drawPorch:
Polygon
fillgradientsaddleBrown 'sienna', start'top'
border'saddleBrown'
Rect fill'sienna', border'brown'
Line fill'brown', lineWidth dashes
Line fill'brown', lineWidth dashes
Line fill'brown', lineWidth dashes
Line fill'brown', lineWidth dashes
def drawSaloon:
# bottom floor
Rect fill'sienna'
Line fill'burlyWood', lineWidth dashes
# Add windows and doors to each group.
drawAllWindows
drawDoor
# top floor
Rect fill'sienna'
Line fill'burlyWood', lineWidth dashes
Rect fill'sienna', border'brown'
Rect fill'sienna', border'brown'
# building name
Rect fillgradientperu 'burlyWood', start'bottom'
border'saddleBrown', borderWidth
LabelSaloon fill'saddleBrown', size
drawPorch
drawSaloon
def onMousePressmouseX mouseY:
skyfill gradientnavy 'rosyBrown', start'top'
ground.fill 'paleGoldenrod'
path.fill 'burlyWood'
# Change the fill of all the windows and doors to their nighttime colors.
### Place Your Code Here ###
def onMouseReleasemouseX mouseY:
skyfill gradientlightBlue 'burlyWood', start'top'
ground.fill 'lemonChiffon'
path.fill 'navajoWhite'
# Change the fill of all the windows and doors to their daytime colors.
### Place Your Code Here ###
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
