Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help with the answers plz include detailed steps as comments what I have done so far from cs1graphics import * from time import sleep

image text in transcribed

need help with the answers plz include detailed steps as comments

what I have done so far

from cs1graphics import * from time import sleep

scene = Canvas() scene.setBackgroundColor('skyBlue') grass = Rectangle(200, 80, Point(100,160)) grass.setFillColor('green') grass.setBorderColor('green') grass.setDepth(100) scene.add(grass) sun = Circle(20, Point(50,30)) sun.setFillColor('yellow') scene.add(sun)

target = Layer() outside = Circle(30) outside.setFillColor('white') outside.setDepth(49) target.add(outside) middle = Circle(20) middle.setFillColor('blue') middle.setDepth(48) target.add(middle) inside = Circle(10) inside.setFillColor('red') inside.setDepth(47) target.add(inside) legs = Path(Point(-25,45), Point(0,0), Point(25,45)) legs.setBorderWidth(2) target.add(legs) target.move(160,110) target.setDepth(75) # in front of grass; behind arrows scene.add(target)

# prepare three arrows, but do not yet add to scene arrow1 = Layer() tip = Polygon(Point(0,0), Point(-8,5), Point(-5,0), Point(-8,-5)) tip.setFillColor('white') arrow1.add(tip) shaft = Path(Point(-30,0), Point(-5,0)) shaft.setBorderWidth(2) shaft.setDepth(51) arrow1.add(shaft) fletching = Polygon(Point(-30,0), Point(-33,-3), Point(-40,-3), Point(-36,0), Point(-38,3), Point(-36,3)) fletching.setFillColor('white') arrow1.add(fletching) arrow1.move(15,120) # initial position arrow2 = arrow1.clone() arrow3 = arrow1.clone()

dialogue = Text('Click target to fire an arrow') dialogue.move(100,170) scene.add(dialogue)

target.wait() # wait indefinitely for user event on target scene.add(arrow1) arrow1.rotate(-20) sleep(0.25) arrow1.move(41,-15) arrow1.rotate(7) sleep(0.25) arrow1.move(41,-5) arrow1.rotate(7) sleep(0.25) arrow1.move(41,5) arrow1.rotate(7) sleep(0.25) arrow1.move(41,17) arrow1.rotate(7)

target.wait() # wait indefinitely for user event on target scene.add(arrow2) arrow2.rotate(-40) sleep(0.25) arrow2.move(39,-22) arrow2.rotate(17) sleep(0.25) arrow2.move(39,-12) arrow2.rotate(17) sleep(0.25) arrow2.move(39,3) arrow2.rotate(17) sleep(0.25) arrow2.move(39,13) arrow2.rotate(17)

target.wait() # wait indefinitely for user event on target scene.add(arrow3) arrow3.rotate(-30) sleep(0.25) arrow3.move(37,-26) arrow3.rotate(10) sleep(0.25) arrow3.move(37,-11) arrow3.rotate(10) sleep(0.25) arrow3.move(37,6) arrow3.rotate(10) sleep(0.25) arrow3.move(37,21) arrow3.rotate(10) dialogue.setMessage('Good shooting!')

scene.wait() # wait for user event anywhere on canvas scene.close()

Assignment 3.2 - Word (Unlicensed Product) FILE HOME INSERT DESIGN PAGE LAYOUT REFERENCES MAILINGS REVIEW VIEW matthew dudley cut Find Replace Select Editing AaBbCcl AaBbCcl AaBbCcl AaBbCcl AaBbC AaBbCcE AaBbCcD AaBbCcC Heading 3 1Normal Ee Copy Paste B 1 u, aic , .2-A-----.- 2.. Title 1 No Spac Heading i Heading 2 Heading 4 Subtitle- Format Painter Font Paragraph Styles SUBSCRIPTION EXPIRED ADDITIONAL INFORMATION f you need to make a quick edit before renewing your subscription, learn more about the Office Web Apps. Lem More UPDATES AVAILABLE Most of the features of Word have been disabled. Reactivate Updates for Office are ready to be installed, but first we need to close some apps.Update now Specific tasks are to: 1. Improve the code by using the for loop. 2. Change the Target to be a Rectangle 3. Change the arrow to the Ball 4. Make the ball size decreasing when it gets closer to the Target 5. Add two lights: red and green changing colors after the ball hits the Target PAGE 1 OF1 137 WORDS L - + 100% 2:06 PM E 2/7/2019

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

Students also viewed these Databases questions

Question

5. How would you describe your typical day at work?

Answered: 1 week ago

Question

7. What qualities do you see as necessary for your line of work?

Answered: 1 week ago