Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle #sets up the turtle graphic
- t=turtle.Pen()
- turtle.bgcolor("black")
- colors= ["red", "black", "red", "black"]
- family= [] #set up a list of family names
- #ask the user for there name
- name=turtle.textinput ("My family","Enter a name, or just hit [ENTER] to end:")
- #Keep asking
- while name !="":
- family.append(name)
- name=turtle.textinput("My family", "Enter a name, or just hit [Enter] to end:")
- for x in range (100):
- t.pencolor(colors[x%len(family)]) #Rotate through the colors
- t.penup()
- t.forward(x*4)
- t.write(family[x%len(family)], font=("Arial",int((x+4)/4),"bold"))
- t.left(360/len(family)+2)
Add Comment
Please, Sign In to add comment