-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnimation_Basic.py
More file actions
53 lines (39 loc) · 904 Bytes
/
Copy pathAnimation_Basic.py
File metadata and controls
53 lines (39 loc) · 904 Bytes
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 time
turtle.bgcolor('black')
# turtle.color('red')
# turtle.shapesize(4,4,4)
player = turtle.Turtle()
player.shapesize(5,5,5)
def animate(color):
player.color(color)
player.shape('square')
time.sleep(0.5)
player.shape('circle')
time.sleep(0.5)
player2 = player.clone()
def animate2(color):
player2.color(color)
player2.shape('square')
time.sleep(0.5)
player2.shape('circle')
time.sleep(0.5)
while True:
animate('red')
player2.goto(200,200)
animate2("green")
# player.goto(0,100)
# animate('yellow')
turtle.mainloop()
'''
while True:
turtle.color('red')
turtle.shape('circle')
time.sleep(0.5)
turtle.color('green')
turtle.shape('square')
time.sleep(0.5)
turtle.color('blue')
turtle.shape('turtle')
time.sleep(0.5)
'''