You need to sign in or sign up before continuing.
Commit aa230bdf by BellCodeEditor

save project

parent a50ceeec
Showing with 66 additions and 0 deletions
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("light blue")
pen.shape("turtle")
pen.hideturtle()
pen.speed(0)
pen.width(5)
pen.up()
pen.goto(-100,100)
item = 0
tuple_one = ["pink","red",40]
tuple_two = ["orange","grey",30]
tuple_three = ["green","purple",40]
tuple_four = ["blue","yellow",30]
tuple_five = ["black","pink",40]
tuple_six = ["yellow","grey",30]
tuple_seven = ["red","orange",40]
tuple_eight = ["purple","black",30]
tuple_nine = ["grey","green",40]
#turtle_list = ["pink","red",40]
pen.pencolor(turtle_list[0])
pen.fillcolor(turtle_list[1])
for i in range(3):
for j in range(3):
if item == 1:
turtle_list = [tuple_one[0],tuple_one[1],tuple_one[2]]
elif item == 2:
turtle_list = [tuple_two[0],tuple_two[1],tuple_two[2]]
elif item == 3:
turtle_list = [tuple_three[0],tuple_three[1],tuple_three[2]]
elif item == 4:
turtle_list = [tuple_four[0],tuple_four[1],tuple_four[2]]
elif item == 5:
turtle_list = [tuple_five[0],tuple_five[1],tuple_five[2]]
elif item == 6:
turtle_list = [tuple_six[0],tuple_six[1],tuple_six[2]]
elif item == 7:
turtle_list = [tuple_seven[0],tuple_seven[1],tuple_seven[2]]
elif item == 8:
turtle_list = [tuple_eight[0],tuple_eight[1],tuple_eight[2]]
else:
turtle_list = [tuple_nine[0],tuple_nine[1],tuple_nine[2]]
pen.down()
pen.begin_fill()
pen.left(45)
pen.forward(turtle_list[2])
pen.circle(turtle_list[2]/2,180)
pen.right(90)
pen.circle(turtle_list[2]/2,180)
pen.forward(turtle_list[2])
pen.left(45)
pen.end_fill()
pen.up()
pen.forward(100)
pen.down()
item += 1
pen.up()
pen.right(90)
pen.forward(100)
pen.right(90)
pen.forward(300)
pen.left(180)
pen.down()
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment