Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

app.background = rgb ( 6 0 , 3 0 , 2 0 ) Rect ( 0 , 2 8 0 , 4 0 0 ,

app.background = rgb(60,30,20)
Rect(0,280,400,120, fill='peru')
# spring and glove
spring1= Oval(0,200,40,75, fill=None, border='grey')
spring2= Oval(10,200,40,75, fill=None, border='grey')
spring3= Oval(20,200,40,75, fill=None, border='grey')
spring4= Oval(30,200,40,75, fill=None, border='grey')
spring5= Oval(40,200,40,75, fill=None, border='grey')
glove = Group(
Oval(80,170,42,32, fill=gradient('red', 'crimson', start='right-top'),
border='darkRed', rotateAngle=-30),
Oval(80,200,85,75, fill=gradient('red', 'crimson', start='right-bottom'),
border='darkRed'),
Oval(80,170,40,30, fill=gradient('red', 'crimson', start='right-top'),
rotateAngle=-30),
Rect(50,200,30,75, fill=gradient('red', 'crimson', start='right'),
border='darkRed', align='center'),
Line(100,167,85,175, fill='darkRed')
)
# punching bag
punchingBag = Group(
Oval(325,350,100,50, fill=gradient('red', 'crimson', start='left'),
border='darkRed'),
Rect(275,100,100,250, fill=gradient('red', 'crimson', start='left')),
Oval(325,100,100,50, fill=gradient('red', 'crimson', start='left'),
border='darkRed')
)
cord = Line(325,0,325,100, fill='white', lineWidth=4, dashes=True)
# comic-style hit symbol
hit = Star(275,200,40,11, fill=gradient('yellow', 'orange'),
border='darkRed', visible=False)
def onMouseMove(mouseX, mouseY):
gapSize = mouseX /5
# Move each of the springs the same distance from each other.
### (HINT: All of the springs are related in a similar manner. A spring's
# centerX value is equal to the previous spring's centerX
# plus the gapSize.)
### Place Your Code Here ###
glove.centerX = mouseX
# If the glove's centerX value is too large, display the hit star and
# update the position of it and the punching bag appropriately.
### Place Your Code Here ###
# Otherwise, reset both the hit star and the punching bag.
### Place Your Code Here ###

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_2

Step: 3

blur-text-image_3

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

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions

Question

8.2 Explain the purpose of onboarding programs.

Answered: 1 week ago