-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSixstars1.py
More file actions
86 lines (77 loc) · 1.62 KB
/
Sixstars1.py
File metadata and controls
86 lines (77 loc) · 1.62 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import turtle
wn = turtle.Screen() # Turtle screen
print("#Creates a playground for turtle. Not must?")
#tess=turtle.Turtle() # Turtle assigned variables
alex=turtle.Turtle() # Turtle assigned variables
alex.speed(3)
alex.pen()
alex.pendown()
alex.hideturtle()
alex.forward(-150)
#alex.left(60)
for i in range (5):
alex.forward(77)
alex.right(144)
"""alex.forward(100)
alex.right(144)
alex.forward(100)
alex.right(144)
alex.forward(100)
alex.right(144)
alex.forward(100)
alex.right(144)"""
alex.penup()
alex.forward(150)
alex.right(144)
alex.pendown()
alex.left(60)
def draw_star(alex,l,a):
for i in range (5):
#alex=turtle.Turtle() <== this will create error
alex.forward(l)
alex.right(a)
return alex
alex.speed(3)
alex.pensize(7)
alex.shape("arrow")
alex.color("blue")
for i in range(5):
l=77
a=144
draw_star(alex,l,a)
alex.penup()
alex.forward(199)
alex.right(144)
alex.pendown()
"""alex.forward(100)
alex.right(145)
alex.forward(100)
alex.right(145)
alex.forward(100)
alex.right(145)
alex.forward(100)
alex.right(145)"""
alex.forward(150)
alex.penup()
alex.forward(150)
alex.right(144)
alex.pendown()
alex.speed(3)
alex.pensize(2)
alex.shape("arrow")
alex.color("yellow")
def draw_star(alex,l,a):
for i in range (5):
#alex=turtle.Turtle() <== this will create error
alex.forward(l)
alex.right(a)
return alex
for i in range(5):
l=77
a=144
draw_star(alex,l,a)
#alex.penup()
alex.forward(299)
alex.right(144)
#alex.pendown()
wn.mainloop()