Ask coding questions

← Back to all posts
unexpected eof while parsing in code
WilliamGosling

I'm trying to make it so that my code will randomly pick one start and one end of animal names to make a new one. However, when i run it, it comes up saying 'unexpected eof while parsing'. Can someone help? I don't know what's wrong.
Thank you,
William

Answered by CalebCarlson [earned 5 cycles]
View Answer
Voters
TomGray5
WilliamGosling
Comments
hotnewtop
CalebCarlson

The last print function is also weird.
here is what you did:

you have a couple things that need to have parenthesis closed.
here is the correct syntax:

CalebCarlson

Your closing bracket for end_animals can't be indented (:
(your closing bracket was indented when it shouldn't have been)
Here is a working example:

pyelias

On line 36, you forgot to close the ( in print(.

CalebCarlson

nice catch, I didn't see that