Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 4: Rock-Paper-Scissors Solution Example crashes on invalid user choice #5

Open
rdegit opened this issue Nov 6, 2020 · 0 comments

Comments

@rdegit
Copy link

rdegit commented Nov 6, 2020

The users choice is validated in the 'if'-clause in line 38. Unfortunately you already print out the game_image[user_choice] in line 32, prior to any validation. So if the users does not choose between 0,1 or 2 you end up in an IndexError in line 32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant