-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.py
More file actions
41 lines (31 loc) · 734 Bytes
/
runner.py
File metadata and controls
41 lines (31 loc) · 734 Bytes
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
import Point as pt
import Perceptron as p
import turtle as t
class runner:
def setcanvas():
t.setup(width = 500, height = 500, startx = 0, starty = 0)
t.ht()
t.pu()
t.setpos(-250,-250)
t.pd()
t.pencolor("red")
t.setpos(250,250)
t.pu()
t.setpos(-250,0)
t.pd()
t.setpos(250,0)
t.pu()
t.setpos(0,250)
t.pd()
t.setpos(0,-250)
def paint(point):
t.penup()
t.setpos(point.x, point.y)
t.pendown()
t.dot(10)
def main():
r = runner
r.setcanvas()
print(pt.getx(), pt.gety())
r.paint(pt)
main()