0

Python developer - game messages

games = ["Alien Shooter", "Tic Tac Toe", "Snake", "Puzzle", "Football"] choice = int(input()) #define the run function def run(games, choice): if choice >= 0 and choice <= 4: print(games[choice]) print("Game over") else: print("Unknown") run(games,choice) It gives me an input error. What can i do to fix it?

2nd Aug 2023, 9:40 AM
Kim Hammar-Milliner
Kim Hammar-Milliner - avatar
6 Antworten
+ 4
Kim Hammar-Milliner It works for me Can you give more details regarding the error you are getting. What are you inputting What is the error message
2nd Aug 2023, 9:53 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
Kim Hammar-Milliner Excellent, well done 😁👍 May I ask what was the problem you found for future reference
2nd Aug 2023, 9:49 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
I am not getting that error when testing.
2nd Aug 2023, 8:20 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
I got it fixed
2nd Aug 2023, 8:40 PM
Kim Hammar-Milliner
Kim Hammar-Milliner - avatar
0
It did not ask me for input. The error message was eof because no input was given
2nd Aug 2023, 12:53 PM
Kim Hammar-Milliner
Kim Hammar-Milliner - avatar
0
Yeah it's working, check when you call the function in bottom you intend it properly?
3rd Aug 2023, 8:05 PM
Haseeb Imran
Haseeb Imran - avatar