Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- data = ["","","<>"]+[""]*1000000
- p = 1
- i = 2
- while i < 1000000:
- if 1000000//i != 1:
- for j in range(1,1000000//i):
- if i*j >= 1000000:
- break
- data[i*j] = data[j] +data[i]
- i += 1
- while i<999998 and data[i] != "":
- i += 1
- p += 1
- data[i] = "<" +data[p] +">"
- turtle.penup()
- turtle.right(90)
- turtle.forward(350)
- turtle.left(90)
- turtle.pendown()
- for i in range(2,4000):
- print(data[i])
- for j in range(0,len(data[i])):
- if data[i][j] == "<":
- turtle.left(30)
- else:
- turtle.right(45)
- turtle.forward(3)
- input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement