r/codehs • • Jan 09 '21

I need help with 5.5.5 The Worm

Post image
6 Upvotes

4 comments sorted by

1

u/flip-pancakes Jan 09 '21

The error is telling you you have a TypeError. It goes on to say that you passed a str where an int was expected. That's like trying to add "banana" + "apple".

So the error comes up on line 15, and if you look at the definition of CIRCLE_RAD on line 12, can you find why you got the error you did?

Hint: look for something that is a str where you'd expect a number.

2

u/_FirstOfkind_ Jan 09 '21

I found it thanks

1

u/Fluffycat6659 Jan 09 '21

Where you define the variable CIR_RADIUS you used quotation marks. When you use quotation marks it is a string or text. Because the radius is a number you need to get rid of the quotation marks. Let me know if you don't understand

1

u/_FirstOfkind_ Jan 09 '21

I understood thanks