import random
def rps():
for i in range(1,10):
print("1 for R, 2 for P, 3 for S")
userchoice = input("Enter your number")
a = random.randint(0,3)
if userchoice == 1 and a == 3:
print("Rock beats Scissors")
elif userchoice == 1 and a == 2:
print("Paper beats Rock")
elif userchoice == 2 and a == 1:
print("Paper beats rock")
elif userchoice == 2 and a == 3:
print("Scissors beats paper")
elif userchoice == 3 and a == 1:
print("Scissors beats paper")
elif userchoice == 3 and a == 2:
print("Scissors beat paper")
elif userchoice == a:
print("its a draw")
rps()
So im making a rock paper scissors game and need help. I think my problem is with the "and" statement. When i run the code and input my answer it doesnt do anything but ask the the question again (i used a while statement). If anyone can find the problem thanks in advance.