Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# labels springLabel = Label ( ' Spring ' , 1 0 , 3 2 0 , fill = 'lightPink', size = 3 0 ,

# labels
springLabel = Label('Spring',10,320, fill='lightPink', size=30, align='left')
summerLabel = Label('Summer',10,360, fill='forestGreen', size=30, align='left')
fallLabel = Label('Fall',390,320, fill='darkOrange', size=30, align='right')
winterLabel = Label('Winter',390,360, fill='white', size=30, align='right')
leaves = Star(200,150,150,16, fill='forestGreen', roundness=90)
# tree trunk and limbs
Polygon(200,100,150,400,250,400, fill='saddleBrown')
Polygon(200,300,200,250,300,175, fill='saddleBrown')
Polygon(200,300,200,250,100,150, fill='saddleBrown')
Polygon(200,200,200,175,125,100, fill='saddleBrown')
Polygon(200,250,200,200,275,100, fill='saddleBrown')
ground = Polygon(115,400,140,380,170,390,210,385,235,390,275,390,
295,400, visible=False)
def onMousePress(mouseX, mouseY):
# If a label is clicked, make the color of the leaves match the color of
# that label. Change the leaves and ground visibility when needed.
### (HINT: Use a shape method to check what label you clicked.)
### Place Your Code Here ###
pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions