May-16-2017, 03:35 PM
Hello! i just coded a rock paper scissors game but i have one issue...
The whole code is completely okay but when i input Rock paper or Scissors in i get the out put and the game ends...
I want to make the game run for ever so i don't have to restart the game everytime i want to play.
How do you do that ?
Also thank you taking your time to help me solve this issue!
Really appreciated :P -TheSpalekUk
The whole code is completely okay but when i input Rock paper or Scissors in i get the out put and the game ends...
I want to make the game run for ever so i don't have to restart the game everytime i want to play.
How do you do that ?
from random import randint Game = ["Rock", "Paper", "Scissors"] Robot = Game[randint(0,2)] Gamer = False while Gamer == False: Gamer = input ("Choose your action! Rock, Paper or Scissors? : " ) if Gamer == Robot: print ("Tie! You both chose the same action!") elif Gamer == "Rock": if Robot == "Scissors": print ("You Win!") else: print ("You Lose!") elif Gamer == "Paper": if Robot == "Rock": print ("You Win!") else: print ("You Lose!") elif Gamer == "Scissors": if Robot == "Paper": print ("You Win!") else: print ("You Lose!") else: print ("Please check if you spelled your action correctly!") Gamer = False Robot = Game[randint(0,2)]Thank you for taking your time reading my Post.
Also thank you taking your time to help me solve this issue!
Really appreciated :P -TheSpalekUk