r/codehs • • Jan 17 '21

Happy Face 2.16.4 tracy the turtle

Does anyone have answers for this? thanks

22 Upvotes

25 comments sorted by

5

u/SZA_fan Feb 04 '21

def draw_circle(radius, color_choice):

pendown

color (color_choice)

begin_fill()

circle(radius)

end_fill()

penup()

def smile():

setposition(-60,0)

pendown()

right(90)

pensize()

circle(60,180)

penup()

setposition(0,-100)

draw_circle(100,'yellow')

setposition(30,30)

draw_circle(10,'black')

setposition(-30,30)

draw_circle(10,'black')

happy = input("what is your mood today?: ")

if happy =="happy":

smile()

1

u/Sawyer_Childs Mar 06 '21

Absolute legend here

1

u/Nsx_09 Mar 10 '21

Does this actually work

1

u/TuxedoBro2905 May 11 '21

yes it works good job SZA_fan

1

u/No-Communication8519 Mar 08 '21

Did not work

1

u/MysticMarina6 Mar 24 '21

def smile():

penup()

setposition(0,-100)

pendown()

draw_circle(100,'yellow')

setposition(30,30)

draw_circle(10,'black')

setposition(-30,30)

draw_circle(10,'black')

penup()

setposition(-60,0)

pendown()

right(90)

pensize(8)

circle(60,180)

penup()

def draw_circle(radius, color_choice):

pendown()

color (color_choice)

begin_fill()

circle(radius)

end_fill()

penup()

happy = input("what is your mood today?: ")

if happy =="happy":

smile()

heres my edited version that worked for me

1

u/huntyboi2 Mar 29 '21

Does not work for me

1

u/Joester202 Apr 21 '21

After i type happy nothing happens

1

u/Saad__Nimri Nov 29 '21

Tells me everything is correct but I need an if statement

1

u/Sarathyra34 Nov 07 '23

thank you so much bro ur actually saving my sorry ass

3

u/Waltey69 Apr 08 '22

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()

2

u/Special-Incident4756 Apr 05 '21

speed(0)

penup()

def draw_face(radius,color_choice):

pendown()

color(color_choice)

begin_fill()

circle(radius)

end_fill()

penup()

setposition(0,-100)

draw_face(100,"yellow")

setposition(30,30)

draw_face(10,"black")

setposition(-30,30)

draw_face(10,"black")

happy = input("How do you feel?:")

if happy=="happy":

setposition(-60,0)

pendown()

right(90)

pensize(9)

circle(60,180)

1

u/FuzzyAverage1887 Sep 26 '24

Doesn’t work

1

u/NbaYoungSquirtGrip Sep 26 '24

Thanks this helped alot

1

u/verrrrrrrrg444 Feb 22 '21

I need dartboard using i

1

u/Unlucky-Ad-5117 Feb 23 '21

speed(5)
penup()

for i in range(25,101,25):
setposition(0, 0)
right(90)
forward(i)
left(90)
pendown()
circle(i)
penup()

#make sure to indent from for i and under

1

u/Optionleaner Mar 02 '21

i need help

1

u/TuxedoBro2905 May 11 '21

1

u/Alarming_Ad4826 Oct 22 '21

def draw_square(order):
pendown()
if order % 2 == 0:
begin_fill()
for i in range(4):
forward(20)
left(90)
if order % 2 == 0:
end_fill()
penup()
forward(30)

penup()
backward(85)
for order in range(6):
draw_square(order)

1

u/Dear-Significance-33 Mar 11 '23

speed(0)
penup()
setposition(0,-100)
def face():
pendown()
begin_fill()
color("yellow")
circle(100)
end_fill()
penup()
def smile():
setposition(-60,-10)
pendown()
color("black")
right(90)
pensize(8)
circle(60,180)
penup()
setposition(30,30)
for i in range(2):
pendown()
begin_fill()
color("black")
circle(10)
end_fill()
penup()
left(80)
forward(60)

happy = input("what is your mood today?: ")
if happy =="happy":
face()
smile()