1def turtle_triangle():
2 window = turtle.Screen()
3 window.bgcolor("red")
4
5 brad = turtle.Turtle()
6
7 brad.shape("turtle")
8 brad.color("yellow")
9 brad.speed(1)
10
11 for _ in range(3):
12 brad.right(60)
13 brad.forward(200)
14 brad.right(60)
15
16 window.exitonclick()
1>>> turtle.home()
2>>> turtle.position()
3(0.00,0.00)
4>>> turtle.heading()
50.0
6>>> turtle.circle(50)
7>>> turtle.position()
8(-0.00,0.00)
9>>> turtle.heading()
100.0
11>>> turtle.circle(120, 180) # draw a semicircle
12>>> turtle.position()
13(0.00,240.00)
14>>> turtle.heading()
15180.0
16
1import turtle # imports it
2whateverYouWantToCallIt = turtle.Turtle() # adds it to the project
3#code
4whateverYouWantToCallIt.forward(10) # moves whateverYouWantToCallIt forward
5whateverYouWantToCallIt.color("purple") # color
6whateverYouWantToCallIt.left(90) # turns him 90 degrees
7whateverYouWantToCallIt.right(90) # turns him 90 degrees the other direction
1import turtle
2myTurtle = turtle.Turtle()
3
4myTurtle.forward(100)
5myTurtle.right(90)
6myTurtle.forward(100)
1>>> player_one = turtle.Turtle()
2>>> player_one.color("green")
3>>> player_one.shape("turtle")
4>>> player_one.penup()
5>>> player_one.goto(-200,100)
6>>> player_two = player_one.clone()
7>>> player_two.color("blue")
8>>> player_two.penup()
9>>> player_two.goto(-200,-100)
10