loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.9405623439131274","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHR1cnRsZQppbXBvcnQgbWF0aAoKZGVmIG1vdmVUdXJ0bGUodCx4LHkpOgogICJNb3ZlIHR1cnRsZSB0IHRvIGxvY2F0aW9uIHgseSB3aXRoIHRoZSBwZW4gdXAsIHBvaW50IGVhc3QiCiAgdC51cCgpCiAgdC5nb3RvKHgseSkKICB0LmRvd24oKQoKZGVmIHdyaXRlVGV4dCh0LG1lc3NhZ2UseCx5KToKICAiV3JpdGUgbWVzc2FnZSB1c2luZyB0dXJ0bGUgdCBhdCAoeCx5KSIKICBtb3ZlVHVydGxlKHQseCx5KQogIHQud3JpdGUobWVzc2FnZSkKCmRlZiBkcmF3U3F1YXJlKHQsc2l6ZSk6CiAgIkRyYXcgYSBzcXVhcmUgd2l0aCB0dXJ0bGUgd2l0aCBzaWRlcyBzaXplIGxvbmciCiAgaT0wCiAgd2hpbGUgaTw0OiAgICAgICMgcmVwZWF0IGZvdXIgdGltZXMKICAgIHQuZm9yd2FyZChzaXplKQogICAgdC5sZWZ0KDkwKQogICAgaSs9MQoKZGVmIGRyYXdUcmlhbmdsZSh0LHNpemUsY29sb3IpOgogICJEcmF3IGEgdHJpYW5nbGUgd2l0aCB0dXJ0bGUgd2l0aCBzaWRlcyBzaXplIGxvbmciCiAgaT0wCiAgdC5wZW5jb2xvcihjb2xvcikKICB3aGlsZSBpPDM6ICAgICAgIyByZXBlYXQgZm91ciB0aW1lcwogICAgdC5mb3J3YXJkKHNpemUpCiAgICB0LmxlZnQoMTIwKQogICAgaSs9MQoKZGVmIGRyYXdSZWN0YW5nbGUoKToKICAiRHJhdyBhIHJlY3RhbmdsZSIKICAiWW91IHdpbGwgbmVlZCB0byBmaWd1cmUgb3V0IHdoYXQgdGhlIHBhcmFtZXRlcnMgYXJlIgogIHByaW50KCJBIHJlY3RhbmdsZSEiKQoKZGVmIGRyYXdQb2x5Z29uKHQsc2lkZXMsc2l6ZSk6CiAgIkRyYXcgYSBwb2x5Z29uIHdpdGggdHVydGxlIHdpdGggc2lkZXMgc2l6ZSBsb25nIgogIHByaW50KCJkcmF3IHBvbHlnb24iKQoKZGVmIGRyYXdIb3VzZSh0LHNpemUsY29sb3IpOgogICJEcmF3IGEgY29sb3IgaG91c2Ugd2l0aCBhIHJvb2YsIHR3byB3aW5kb3dzIGFuZCBhIGRvb3Igb2Ygc2l6ZSBzaXplIgogIHByaW50KCJkcmF3IGhvdXNlIikKCmFsZXggPSB0dXJ0bGUuVHVydGxlKCkKd3JpdGVUZXh0KGFsZXgsIkhvbWUgaXMgd2hlcmUgdGhlIGhlYXJ0IGlzISIsLTIwMCwyMDApCm1vdmVUdXJ0bGUoYWxleCwwLDApCmRyYXdTcXVhcmUoYWxleCwyNSkKbW92ZVR1cnRsZShhbGV4LC0yNSwtMjUpCmRyYXdTcXVhcmUoYWxleCw3NSkKbW92ZVR1cnRsZShhbGV4LC03NSwtNzUpCmRyYXdUcmlhbmdsZShhbGV4LDE3NSwiYmx1ZSIpCm1vdmVUdXJ0bGUoYWxleCwtMTUwLC03NSkKZHJhd0hvdXNlKGFsZXgsMjAwLGdyZWVuKQoKCnduLmV4aXRvbmNsaWNrKCk="},"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
49
50
51
52
53
54
55
56
57
import turtle
import math

def moveTurtle(t,x,y):
  "Move turtle t to location x,y with the pen up, point east"
  t.up()
  t.goto(x,y)
  t.down()

def writeText(t,message,x,y):
  "Write message using turtle t at (x,y)"
  moveTurtle(t,x,y)
  t.write(message)

def drawSquare(t,size):
  "Draw a square with turtle with sides size long"
  i=0
  while i<4:      # repeat four times
    t.forward(size)
    t.left(90)
    i+=1

def drawTriangle(t,size,color):
  "Draw a triangle with turtle with sides size long"
  i=0
  t.pencolor(color)
  while i<3:      # repeat four times
    t.forward(size)
    t.left(120)
    i+=1

def drawRectangle():
  "Draw a rectangle"
  "You will need to figure out what the parameters are"
  print("A rectangle!")

def drawPolygon(t,sides,size):
  "Draw a polygon with turtle with sides size long"
  print("draw polygon")

def drawHouse(t,size,color):
  "Draw a color house with a roof, two windows and a door of size size"
  print("draw house")

alex = turtle.Turtle()
writeText(alex,"Home is where the heart is!",-200,200)
moveTurtle(alex,0,0)
drawSquare(alex,25)
moveTurtle(alex,-25,-25)
drawSquare(alex,75)
moveTurtle(alex,-75,-75)
drawTriangle(alex,175,"blue")
moveTurtle(alex,-150,-75)
drawHouse(alex,200,green)


wn.exitonclick()
result
console