Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

app.background = 'mediumseaGreen' app.stepsPerSecond = 2 0 # glow rays = Star ( 2 0 0 , 2 0 0 , 1 7 5 ,

app.background = 'mediumseaGreen'
app.stepsPerSecond =20
# glow
rays = Star(200,200,175,25, fill='lemonChiffon', roundness=5, opacity=0)
raysCover = Polygon(130,165,270,165,200,285, fill='mediumSeaGreen')
# triforce symbol
top = RegularPolygon(0,-175,80,3,
fill=gradient('yellow', 'darkGoldenrod', start='right-top'),
border='goldenrod', borderWidth=4, rotateAngle=40)
bottomLeft = RegularPolygon(-170,445,80,3,
fill=gradient('yellow', 'darkGoldenrod',
start='right-top'),
border='goldenrod', borderWidth=4, rotateAngle=40)
bottomRight = RegularPolygon(570,445,80,3,
fill=gradient('yellow', 'darkGoldenrod',
start='right-top'),
border='goldenrod', borderWidth=4, rotateAngle=80)
def onStep():
# If the top polygon's centerX is less than 200, then increase
# its angle and centerX, centerY.
if (top.centerX <200):
top.rotateAngle +=2
top.centerX +=2
top.centerY +=3
# If the bottomLeft polygon's centerX is less than 130, then rotate
# and move it up and right.
### (HINT: For each polygon the angles will always change by the same
# number, and they will take the same number of steps to get to
# their final location.)
### Place Your Code Here ###
elif (bottomLeft.centerX <130):
bottomLeft.rotateAngle +=2
bottomLeft.centerX +=3
bottomLeft.centerY +=2
# If the bottomRight polygon's centerX is greater than 270, then rotate
# it and move it up and left.
### Place Your Code Here ###
elif (bottomRight.centerX >270):
bottomRight.rotateAngle +=2
bottomRight.centerX -=3
bottomRight.centerY +=2
# Otherwise, change the background, the fill for raysCover and
# change the rays opacity.
### Place Your Code Here ###
else:
app.background =('mediumSeaGreen', 'seaGreen')
raysCover.fill =('mediumSeaGreen', 'seaGreen')
rays.opacity =40

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago