Skip to content

Commit 285a2a2

Browse files
committed
updates to markdown content
1 parent 83fec86 commit 285a2a2

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ nav:
6767

6868
site_description: 'Resources for teaching Python to CoderDojo Twin Cities students.'
6969
site_author: 'Dan McCreary'
70-
repo_name: 'python'
70+
repo_name: 'GitHub Repo'
7171
repo_url: 'https://github.com/CoderDojoTC/python'
7272

7373
# CoderDojo Standards from here down

src/draw-for-squares-input-colors.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+

0 commit comments

Comments
 (0)