Skip to content

Commit b770a71

Browse files
committed
Updated comments. Refined user syntax
Removed the `and` from mood choice in Happy-Face Added comments to circle in a square
1 parent 63189b9 commit b770a71

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
circleColor = "Blue"
2-
squareColor = "Red"
1+
circleColor = "Blue" # Set color of the circle
2+
squareColor = "Red" # Set color of the square
33

4-
def circle_in_square(radius):
4+
def circle_in_square(radius): # Pass radius to the def
55
pendown()
66
begin_fill()
77
color(squareColor)
@@ -12,11 +12,11 @@ def circle_in_square(radius):
1212
print("Drawing square with radius " + str(int(radius * 2)))
1313
left(90)
1414
forward(radius)
15-
end_fill()
16-
begin_fill()
15+
end_fill() # Finish Square
16+
begin_fill() # Start Circle
1717
print("Drawing Circle with radius " + str(radius))
1818
color(circleColor)
1919
circle(radius)
2020
end_fill()
2121

22-
circle_in_square(input("Shape Size: "))
22+
circle_in_square(input("Shape Size: ")) # Ask for user input

CodeHS/2/16/4/Happy Face-Joe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def drawSmile(happy, headcolor, headsize):
5757
print("Error in input, expected 'happy' or 'sad'")
5858
print(happy)
5959

60-
drawSmile(input("Input your mood, supported inputs are: happy and sad:"), "Yellow", 80)
60+
drawSmile(input("Input your mood, supported inputs are: happy, sad:"), "Yellow", 80)

0 commit comments

Comments
 (0)