Answered step by step
Verified Expert Solution
Question
1 Approved Answer
app.background = rgb ( 5 5 , 2 2 5 , 2 0 5 ) app.stepsPerSecond = 2 5 # body outerHead = Oval (
app.background rgb app.stepsPerSecond # body outerHead Oval fillrgb animal Oval fillrgb animal.type 'jellyfish' Rect fillrgb # tentacles tentacles Line fillrgb lineWidth dashes # eyes Circle Circle Circle fill'grey' Circle fill'grey' # mouth Circle fillrgb mouthCover Rect fillrgb # bubbles Circle fillgradientlightCyan 'lavender' opacity bordergradientpowderBlue 'cornflowerBlue', start'top' Circle fillgradientlightCyan 'lavender' opacity bordergradientpowderBlue 'cornflowerBlue', start'top' Circle fillgradientlightCyan 'lavender' opacity bordergradientpowderBlue 'cornflowerBlue', start'top' Circle fillgradientlightCyan 'lavender' opacity bordergradientpowderBlue 'cornflowerBlue', start'top' Circle fillgradientlightCyan 'lavender' bordergradientpowderBlue 'cornflowerBlue', start'top' ink Polygon opacity visibleFalse def onMousePressmouseX mouseY: # Define these local variables depending on what animal is showing. ### HINT: Use the custom property animal.type, and change the type # each time you press the mouse! ### Fix Your Code Here ### backColor rgb frontColor rgb animalHeight # Uses the local variables to set the animal's properties. outerHead.fill backColor outerHead.height animalHeight animal.fill frontColor animal.height animalHeight mouthCover.fill frontColor tentacles.fill frontColor if animaltype 'squid': ink.visible True tentacles.toFront else: ink.visible False
app.background rgb
app.stepsPerSecond
# body
outerHead Oval fillrgb
animal Oval fillrgb
animal.type 'jellyfish'
Rect fillrgb
# tentacles
tentacles Line fillrgb lineWidth
dashes
# eyes
Circle
Circle
Circle fill'grey'
Circle fill'grey'
# mouth
Circle fillrgb
mouthCover Rect fillrgb
# bubbles
Circle fillgradientlightCyan 'lavender' opacity
bordergradientpowderBlue 'cornflowerBlue', start'top'
Circle fillgradientlightCyan 'lavender' opacity
bordergradientpowderBlue 'cornflowerBlue', start'top'
Circle fillgradientlightCyan 'lavender' opacity
bordergradientpowderBlue 'cornflowerBlue', start'top'
Circle fillgradientlightCyan 'lavender' opacity
bordergradientpowderBlue 'cornflowerBlue', start'top'
Circle fillgradientlightCyan 'lavender'
bordergradientpowderBlue 'cornflowerBlue', start'top'
ink Polygon
opacity visibleFalse
def onMousePressmouseX mouseY:
# Define these local variables depending on what animal is showing.
### HINT: Use the custom property animal.type, and change the type
# each time you press the mouse!
### Fix Your Code Here ###
backColor rgb
frontColor rgb
animalHeight
# Uses the local variables to set the animal's properties.
outerHead.fill backColor
outerHead.height animalHeight
animal.fill frontColor
animal.height animalHeight
mouthCover.fill frontColor
tentacles.fill frontColor
if animaltype 'squid':
ink.visible True
tentacles.toFront
else:
ink.visible False
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started