Skip to content

Instantly share code, notes, and snippets.

@fakruboss
Created July 4, 2017 04:30
Show Gist options
  • Save fakruboss/8aff90bc20f6e31ac725abee2d350fde to your computer and use it in GitHub Desktop.
Save fakruboss/8aff90bc20f6e31ac725abee2d350fde to your computer and use it in GitHub Desktop.
while True:
a=input("Player1: ",)
b=input("Player2: ",)
if a=='rock':
if b=='paper':
print ("Congragulations ! Player2 won")
elif b=='scissor':
print ("Congragulations ! Player1 won")
else:
print ("Draw")
elif a=='paper':
if b=='scissor':
print ("Congragulations ! Player2 won")
elif b=='rock':
print ("Congragulations ! Player1 won")
else:
print ("Draw")
elif a=='scissor':
if b=='rock':
print ("Congragulations ! Player2 won")
elif b=='paper':
print ("Congragulations ! Player1 won")
else:
print ("Draw")
print ("Do you want to start a new game: ",)
result=input()
if result!='yes':
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment