Skip to content
Sign upLog in

Why isn't my code working

Profile icon
SreePaladugu

I am confused. I am pretty sure, that the code is right, I don't understand why it isn't working. What I am trying to do is create a star that is filled in. Can someone help me find my mistake?

You are viewing a single comment. View All
Answered by Bookie0 [earned 5 cycles]
View Answer
Profile icon
SreePaladugu

@Bookie0
wait so like this, but when I run it, it's not working, its says bad input on line 5, what am I doing wrong?:

t = turtle.Turtle() def mystar(size, filled): mystar(size,filled): if filled == True: t.begin_fill() for x in range(1, 19): t.forward(size) if x % 2 == 0: t.left(175) else: t.left(225) if filled == True: t.end_fill()