loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.580328856407244","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHR1cnRsZQppbXBvcnQgcmFuZG9tCmltcG9ydCBtYXRoCnNjcmVlbiA9IHR1cnRsZS5TY3JlZW4oKSAKc2NyZWVuLmJnY29sb3IoJ2JsYWNrJykKCgojQmFsbCBsb2NhdGlvbiAoR2xvYmFsKQpiYWxsWD0wCmJhbGxZPTAKZFg9IHJhbmRvbS5yYW5kaW50KC01LDUpCmRZPSByYW5kb20ucmFuZGludCgtNSw1KQpiYWxsID0gdHVydGxlLlR1cnRsZSgpCmRpc3RhbmNlPTEwMApjb3JuZXI9RmFsc2UKCmRlZiBzZXR1cEJhbGwoKToKICBnbG9iYWwgYmFsbAogIGdsb2JhbCBiYWxsWAogIGdsb2JhbCBiYWxsWQogIGJhbGwuc2hhcGUoJ2NpcmNsZScpCiAgYmFsbC5zcGVlZCgwKQogIGJhbGwuY29sb3IoJ2JsdWUnKQogIGJhbGwucGVudXAoKQogIGJhbGwuZ290byhiYWxsWCxiYWxsWSkKICBwcmludChkWCxkWSkKCmRlZiBhbmltYXRlKCk6CiAgZ2xvYmFsIGJhbGwKICBnbG9iYWwgYmFsbFgKICBnbG9iYWwgYmFsbFkKICBnbG9iYWwgZFgKICBnbG9iYWwgZFkKICBpZiBiYWxsWD4xMDAgb3IgYmFsbFg8LTEwMDoKICAgIGRYID0gLWRYCiAgaWYgYmFsbFk+MTAwIG9yIGJhbGxZPC0xMDA6CiAgICBkWSA9IC1kWQogIGJhbGxYKz1kWAogIGJhbGxZKz1kWQogIGJhbGwuZ290byhiYWxsWCxiYWxsWSkKICBzY3JlZW4ub250aW1lcihhbmltYXRlLDUpCiAgCnNldHVwQmFsbCgpCnNjcmVlbi5vbnRpbWVyKGFuaW1hdGUsNSkKCndoaWxlIFRydWU6CiAgZFg9aW50KGlucHV0KCJkWDoiKSkK"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import turtle
import random
import math
screen = turtle.Screen() 
screen.bgcolor('black')


#Ball location (Global)
ballX=0
ballY=0
dX= random.randint(-5,5)
dY= random.randint(-5,5)
ball = turtle.Turtle()
distance=100
corner=False

def setupBall():
  global ball
  global ballX
  global ballY
  ball.shape('circle')
  ball.speed(0)
  ball.color('blue')
  ball.penup()
  ball.goto(ballX,ballY)
  print(dX,dY)

def animate():
  global ball
  global ballX
  global ballY
  global dX
  global dY
  if ballX>100 or ballX<-100:
    dX = -dX
  if ballY>100 or ballY<-100:
    dY = -dY
  ballX+=dX
  ballY+=dY
  ball.goto(ballX,ballY)
  screen.ontimer(animate,5)
  
setupBall()
screen.ontimer(animate,5)

while True:
  dX=int(input("dX:"))
result
console