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.

Revisions

  1. Wilo created this gist Nov 3, 2022.
    21 changes: 21 additions & 0 deletions Rock_Paper_Scissors.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    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}')