0
Help me please for Game machine problem ( in python )
Anyone please help me to solve the problem so that I can move further with my lessons
11 ответов
+ 4
Read my reply here:
https://www.sololearn.com/Discuss/3242472/?ref=app
Quoting myself:
"choice" is a number and this number is the index of an element in "games".
so what you need to do is use "choice" as an index on the "games" list. And print that out!
+ 4
Novahu Bora ,
#Don't repeat your own questions..
https://www.sololearn.com/Discuss/3243143/?ref=app
#Use only relevant tags instead of `need`.
read this about tags..
https://code.sololearn.com/W3uiji9X28C1/?ref=app
#Note that,If you're having trouble in code, share your code and then describe what error message you're receiving. without watching no one can figure out what's going wrong.
+ 2
show your updated code.
you have "games" and "choice". these are the variables you need to work with.
+ 2
Naryan Naik
Do not give ready-made code. Rather, help the asking person to find the solution themselves and explain the approach.
+ 1
Hello try this it worked
#installed games
games = [
'Soccer', 'Tic Tac Toe', 'Snake',
'Puzzle', 'Rally']
#taking player's choice as a number input
choice = int(input())
if choice==0:
print(games[0] )
elif choice <=2 :
print(games[2])
elif choice>=4:
print(games[4])
0
installed games
games = [
'Soccer', 'Tic Tac Toe', 'Snake',
'Puzzle', 'Rally']
#taking player's choice as a number input
choice = int(input())
#output the corresponding game
0
How can I solve it
0
Thank u lisa but I still can't get it 😥
0
I got it lisa, thank u for mentoring me
0
Because iam also doing too much effort for slove this task so i just want to help other people
0
If they can't get answer someone stop to learn coding also so if they know answer they will continue....