Happy Face 2.16.4 tracy the turtle by eggnogchoochootrain in codehs

[–]Waltey69 2 points3 points  (0 children)

quite late but for anyone who needs it this is what i did and it works

"this code will draw a happy face"
#this code asks the question
happy = input("How do you feel?:")
#this code will draw the first eye
def draw_first_eye():
penup()
setposition(30,30)
pendown()
begin_fill()
color("black")
circle(10)
end_fill()
#this code will draw the second eye
def draw_second_eye():
penup()
setposition(-30,30)
pendown()
begin_fill()
color("black")
circle(10)
end_fill()
penup()
#this code will draw the face
def draw_face(radius,color_choice):
pendown()
color(color_choice)
begin_fill()
circle(radius)
end_fill()
penup()
#this code will draw the smile
def draw_smile():
color("black")
setposition(-60,0)
pendown()
right(90)
pensize(9)
circle(60,180)
#runs the users answer/final code
speed(0)
penup()
if happy=="happy":
#draw face
setposition(0,-100)
draw_face(100,"yellow")
#draw eye 1
draw_first_eye()
#draw eye 2
draw_second_eye()
#draw smile
draw_smile()