Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created March 24, 2016 01:52
Show Gist options
  • Save joffilyfe/20ee553c579058e78cfe to your computer and use it in GitHub Desktop.
Save joffilyfe/20ee553c579058e78cfe to your computer and use it in GitHub Desktop.
primeiro = {
'tesoura': 'papel',
'papel': 'pedra',
'pedra': 'lagarto',
'lagarto': 'Spock',
'Spock': 'tesoura',
}
segundo = {
'tesoura': 'lagarto',
'lagarto': 'papel',
'Spock': 'pedra',
'papel': 'Spock',
'pedra': 'tesoura'
}
qtd = int(input())
for n in range(qtd):
sheldon, raj = raw_input().split()
if (sheldon == raj):
print("Caso #{}: De novo!".format(n+1))
elif (primeiro.get(sheldon) == raj or segundo.get(sheldon) == raj):
print("Caso #{}: Bazinga!".format(n+1))
elif (primeiro.get(raj) == sheldon or segundo.get(raj) == sheldon):
print("Caso #{}: Raj trapaceou!".format(n+1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment