Skip to content

Instantly share code, notes, and snippets.

@Wilo
Created November 3, 2022 03:24
Show Gist options
  • Select an option

  • Save Wilo/3c47da362164abe5af10efb58f681c68 to your computer and use it in GitHub Desktop.

Select an option

Save Wilo/3c47da362164abe5af10efb58f681c68 to your computer and use it in GitHub Desktop.
A simple rock Paper Scissors game
n = int(input())
p_1 = input().split()
p_2 = input().split()
a,b=0,0
for x,y in zip(p_1,p_2):
if x=='ROCK':
if y=='PAPER':
b+=1
if y=='SCISSORS':
a+=1
if x=='PAPER':
if y=='SCISSORS':
b+=1
if y=='ROCK':
a+=1
if x=='SCISSORS':
if y=='ROCK':
b+=1
if y=='PAPER':
a+=1
print(f'{a}-{b}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment