+ 1
Can someone please tell why paper keeps losing against rock? Edit: I think it's fixed
I'm trying to code the Big Bang Theory game: Rock Paper Scissors Lizard Spock. I keep having issues which paper losing against rock but I don't understand why. https://code.sololearn.com/ck9oC23tj1zE/?ref=app
3 Respostas
+ 4
Ava Alford
Just print this and see what is happening
wins = {
'paper':'rock' , 'rock': 'scissors', 'scissors': 'paper', 'rock':'lizard', 'lizard':'spock', 'spock':'scissors', 'scissors': 'lizard', 'lizard':'paper', 'paper':'spock', 'spock':'rock'
}
print (wins)
You will find where is mistake.
+ 4
Ava Alford
Dictionary can not have duplicate keys so
'paper' : 'rock' will be replaced by
'paper' : 'spock'
+ 3
A͢J thank you. I must have forgotten about that. I think I fixed it.