import random
userChoice = input('Pick "r", "p", "s": ')
computerChoice = random.choice(['r', 'p', 's'])
p1 = str(userChoice)
p2 = str(computerChoice)
print("P1: Choose: ", p1)
print("P2: Choose: ", p2)
if p1 == p2 :
print("DRAW!")
elif p1 is 'r' and p2 is 's' or p1 is 'p' and p2 is 'r' or p1 is 's' and p2 is 'p':
print("Player 1: Has won the match")
else:
print("Player 2: Has won the match")
My IDE spews warning when I am using this code?
Currently learning python, I would appreciate an explanation if possible!
Thank you.
The code works as is but I get errors before I run it saying logical error.