+ 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

29th Apr 2022, 4:31 PM
Ava Alford
3 Answers
+ 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.
29th Apr 2022, 4:40 PM
A͢J
A͢J - avatar
+ 4
Ava Alford Dictionary can not have duplicate keys so 'paper' : 'rock' will be replaced by 'paper' : 'spock'
29th Apr 2022, 4:42 PM
A͢J
A͢J - avatar
+ 3
A͢J thank you. I must have forgotten about that. I think I fixed it.
29th Apr 2022, 5:34 PM
Ava Alford