I am getting some little error like sometime its being tieing game

#project 1 rock,paper,scisser
import random
def gameWin(comp,you):
if comp == you:
return None
elif comp==‘R’:
if you==‘S’:
return False
elif you==‘P’:
return True
elif comp==‘P’:
if you==‘R’:
return False
elif you==‘S’:
return True
elif comp==‘S’:
if you==‘P’:
return False
elif you==‘R’:
return True

print(“comp turns:Rock(1)paper(2)scisser(3)?”)
if randNo==1:
elif randNo==2:
elif randNo==3:

you=input(“your turn:Rock(R)paper(P)scisser(S)?”)
a =gameWin(comp,you)

print(f"computer choose {comp}")
print(f"you choose {you}")

if a == None:
print(“Game is tied!”)
elif a:
print(“you won the game!”)
else :
print(“you lose the game!”)

Hi Rushiraj. Can you give an example of where the program incorrectly shows a tie ?

It will also be helpful for me to understand if you could indent your code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.