0

#installed games games = [ 'Soccer', 'Tic Tac Toe', 'Snake', 'Puzzle', 'Rally'] #taking player's choice as a number input c

Can any one find how to give output

12th Dec 2023, 12:45 PM
vankudoth vittal
vankudoth vittal - avatar
1 Answer
+ 1
choice = int(input()) if 1 <= choice <= len(games): selectedGame = games[choice - 1] print(selectedGame) else: print("invalid choice")
12th Dec 2023, 2:31 PM
Angelo Abi Hanna
Angelo Abi Hanna - avatar