1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Luba_88 [7]
2 years ago
12

Im trying to do an animation only using simplegui in python and my objective is make the ball enters frame, be confused and jump

to the square in the middle of the room. The problem is that the ball is duplicating and moving its copy instead of moving itself. Here is the code:
import simplegui


x = -100

y = 450

a = 100

b = 450


def draw_handler(canvas):


#back grownd ---------------------------------------------------------------


canvas.draw_polygon([(0,500), (600, 500), (600, 600), (0,600)], 4, "gray", "gray")

canvas.draw_polygon([(200, 477), (400, 477), (400, 500), (200, 500)], 4, "#a6712d", "#a6712d")


#bomb 1

canvas.draw_line((553, 304), (530, 275), 10, "white")

canvas.draw_circle((570,330), 43, 5, "black", "black")


#bomb 2

canvas.draw_line((35, 253), (36, 224), 10, "white")

canvas.draw_circle((33, 298), 43, 5, "black", "black")




#box 1

canvas.draw_polygon([(0, 322), (172, 322), (172, 500), (0, 500)], 20, "#a16c27", "#734810")

canvas.draw_line((172, 322), (0, 500), 20, "#a16c27")


#box 2

canvas.draw_polygon([(476, 374), (600, 374), (600, 500), (476, 500)], 20, "#a16c27", "#734810")

canvas.draw_line((600, 374), (476, 500), 20, "#a16c27")


#character ---------------------------------------------------------------

#x = 300

#y = 400


#canvas.draw_circle((x, y), 80, 10, "#bd80d9", "#a93bdb")

#canvas.draw_polygon([(x+ 30, y - 110), (x-30, y - 110), (x-30, y - 140), (x-15, y-130), (x, y-150), (x+15,y-130), (x+30,y-140)], 3, "#f5bd56", "#f5d356")


#story board 1 ---------------------------------------------------------------


def animation():

x = -100

y = 450


canvas.draw_circle((x, y), 80, 10, "#bd80d9", "#a93bdb")

canvas.draw_polygon([(x+ 30, y - 110), (x-30, y - 110), (x-30, y - 140), (x-15, y-130), (x, y-150), (x+15,y-130), (x+30,y-140)], 3, "#f5bd56", "#f5d356")


#story board 2 ---------------------------------------------------------------


def animation():

global x

global y



x = x+1.5

if(x>100):

x = 100


canvas.draw_circle((x, y), 80, 10, "#bd80d9", "#a93bdb")

canvas.draw_polygon([(x+ 30, y - 110), (x-30, y - 110), (x-30, y - 140), (x-15, y-130), (x, y-150), (x+15,y-130), (x+30,y-140)], 3, "#f5bd56", "#f5d356")


#story board 3 ---------------------------------------------------------------


if(x == 100):

canvas.draw_text("???", (150, 370), 40, "white")


#story board 4 ---------------------------------------------------------------


global a

global b


a = a + 5

b = b - 2.5


if (a > 300):

a = 300

b = 400


canvas.draw_circle((a, b), 80, 10, "#bd80d9", "#a93bdb")

canvas.draw_polygon([(a+ 30, b - 110), (a-30, b - 110), (a-30, b - 140), (a-15, b-130), (a, b-150), (a+15,b-130), (a+30,b-140)], 3, "#f5bd56", "#f5d356")







animation()


frame = simplegui.create_frame('Testing', 600, 600)

frame.set_canvas_background("#363636")

frame.set_draw_handler(draw_handler)

frame.start()


I would really appreciate some help
Computers and Technology
1 answer:
viva [34]2 years ago
5 0
The answer is B = 450 because I just know
You might be interested in
Choose the term that best matches the definition.
Y_Kistochka [10]

Answer: it’s network protocol

Explanation:

4 0
3 years ago
Effective teams use strategies that help members work together a) smoothly b) independently c) loosely d) secretly
kipiarov [429]

Answer: <u><em> A. Smoothly</em></u>

Explanation: I Just Had This Question

Brainliest Please!!!

Please!!!!!!

3 0
3 years ago
Read 2 more answers
In order to estimate the percentage of defects in a recent manufacturing batch, a quality control manager at Intel selects every
Bezzdna [24]

Answer:

systematic sampling method

Explanation:

Based on the information provided within the question it can be said that in this scenario the method that was used was a systematic sampling method. This method focuses on selecting elements from a ordered sampling frame, which in this case refers to every 8th chip starting from the 3rd. This method repeats once the end of the list or process is reached which is 140 chips in this scenario.

7 0
3 years ago
Which is the right answer
Maksim231197 [3]

Answer:

B

Explanation:

I think.

5 0
3 years ago
Read 2 more answers
Which of these benefits can be achieved whensoftware is restructured?
Ivenika [448]

Answer:

iv. all of the given options

Explanation:

This is the correct answer because this is what happens when software is restructured.

<em>PLEASE</em><em> </em><em>DO MARK</em><em> </em><em>ME AS</em><em> </em><em>BRAINLIEST</em><em> </em><em>IF</em><em> </em><em>MY ANSWER</em><em> </em><em>IS HELPFUL</em><em> </em><em>;</em><em>)</em><em> </em>

4 0
3 years ago
Other questions:
  • All waves consist of a continuous series of _____.
    11·2 answers
  • Which of these computers was marketed as a computer/game machine?
    15·2 answers
  • Implement function translate() that provides a rudimentary translation service. The function input is a dictionary mapping words
    9·1 answer
  • When do posts on social media networks disappear? A. After 5 years B. Once you've posted enough where it's too far to scroll bac
    5·2 answers
  • Keion works as a freelancer creating websites and designing logos for clients. He recently had a hard drive failure and lost wor
    12·1 answer
  • My programming lab 9.2 C++ Write a full class definition for a class named Counter, and containing the following members:_______
    6·1 answer
  • You have just installed a SOHO router in a customer's home and the owner has called to say his son is complaining that Internet
    5·1 answer
  • Given an 10-bit two's complement binary number, what is the decimal value of the largest negative integer that can be represente
    10·1 answer
  • Consider a system that contains 32K bytes. Assume we are using byte addressing, that is assume that each byte will need to have
    10·1 answer
  • Which wireless specification can connect to a school's WLAN and connect to multimedia display projectors wirelessly?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!