repl.it
@panniu/

Turtle Graph

Python (with Turtle)

No description

fork
loading
main.py
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
import turtle
import re

t = turtle.Turtle()
def back():
	t.rt(180)
def right():
	t.rt(90)
def left():
	t.lt(90)
def move(steps):
	for x in range(steps):
		t.fd(20)
def setup():
	maxi = 15
	t.speed(0)
	#t.penup()
	back()
	move(5)
	right()
	for x in range(maxi):
		t.write(str(x))
		move(1)
	y = t.clone()
	back()
	move(maxi)
	left()
	for x in range(maxi):
		t.write(str(x))
		move(1)
	x = t.clone()
	back()
	move(maxi)
	back()
	right()
	for x in range(maxi):
		if x != 0 :
			t.write(" -"+str(x))
		move(1)
	my = t.clone()
	back()
	move(maxi)
	back()
	right()
	for x in range(maxi):
		if x != 0 :
			t.write(" -"+str(x))
		move(1)
	mx = t.clone()
	back()
	move(maxi)
	
setup()
result
console
?