Game of change challenge project

Could somebody tell me why the strings from line 23 onwards are not being printed? Also, please do give me a suggestion on what I can do to improve on my current code. Thank you so much!

What could cause unreachable code?

Clearly something happens before line 23? You could insert more print statements everywhere to see where your code does and doesn’t get

After testing the code, I realised it was the return statements causing the issue. I then used a different solution that is similar to the answer provided by codecademy (if guess == “tails” and num == 1). However, is it still possible to make the idea I originally had in mind work?

why would you want this?

Im just curious as I know there usually are different methods to tackle the same problems.

You would just need to update the num variable, but i think your approach currently has too many steps.

I don’t know what you end up doing, why introduce numbers while you already have strings you can compare?

I see. Thanks for the help!