I am trying to make an simple python Rock, Paper, Scissors, game. Here is my entire code.
import random
# The AI Respond, will be random.
print('Welcome to Rock, Paper, Scissors Game! \n')
UserInput = input("Please enter Rock, Paper, or Scissors, to start the game. \n")
BotChoicelist = ["Rock", "Paper", "Scissors", "Rock", "Paper", "Scissors", "Rock", "Paper", "Scissors"]
BotAwnser = random.sample(BotChoicelist, 1)
UserScore = 0
#If1
if "Rock" or "rock" in UserInput:
if "Rock" in BotAwnser:
print("Bot choose Rock, Tie")
if "Paper" in BotAwnser:
print("Bot choose Paper, Bot won.")
print("Your score is:")
print(UserScore - 1)
if "Scissors" in BotAwnser:
print("Bot choose Scissors, You won.")
print("Your score is:")
print(UserScore + 1)
#if2
if "Paper" or "paper" in UserInput:
if "Paper" in BotAwnser:
print("Bot choose Paper, Tie")
if "Scissors" in BotAwnser:
print("Bot choose Scissors, Bot won.")
print("Your score is:")
print(UserScore - 1)
if "Rock" in BotAwnser:
print("Bot choose Rock, You won.")
print("Your score is:")
print(UserScore + 1)
The problem is no matter what i enter at UserInput it will start the If1 and If2, how can i fix that? To be more clear here is the output:
Welcome to Rock, Paper, Scissors Game!
Please enter Rock, Paper, or Scissors, to start the game.
AnyThingHere
Bot choose Scissors, You won.
Your score is:
1
Bot choose Scissors, Bot won.
Your score is:
-1