File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 67
67
68
68
site_description : ' Resources for teaching Python to CoderDojo Twin Cities students.'
69
69
site_author : ' Dan McCreary'
70
- repo_name : ' python '
70
+ repo_name : ' GitHub Repo '
71
71
repo_url : ' https://github.com/CoderDojoTC/python'
72
72
73
73
# CoderDojo Standards from here down
Original file line number Diff line number Diff line change
1
+ # J.E. Tannenbaum
2
+ # Released: 11/10/2021 - Initial release
3
+ # 11/10/2021 - Cleaned up and added comments
4
+ # https://trinket.io/python/94326b4743
5
+
6
+ import turtle # Load the library
7
+ jet = turtle .Turtle () # Create the turtle object and name it
8
+ jet .shape ("turtle" ) # Set the shape
9
+
10
+ def drawIt (color , distance , angle ):
11
+ jet .color (color )
12
+ jet .begin_fill ()
13
+ jet .forward (distance )
14
+ jet .right (angle )
15
+ jet .forward (distance )
16
+ jet .right (angle )
17
+ jet .forward (distance )
18
+ jet .right (angle )
19
+ jet .forward (distance )
20
+ jet .end_fill ()
21
+
22
+ # Set the distance and angle variables
23
+ distance = 40
24
+ angle = 90
25
+
26
+ colors = []
27
+ for i in range (4 ):
28
+ color = input ("Enter a color:" )
29
+ colors = colors + [color ]
30
+
31
+ for color in colors :
32
+ drawIt (color , distance , angle )
33
+
34
+ # We are done, so hide the turtle
35
+ jet .hideturtle ()
36
+
You can’t perform that action at this time.
0 commit comments