+ 1

Can someone explain to me why this code of rockPaperScissors doesn't work well ?

I don't know why the code doesn't work as I want https://code.sololearn.com/cJTeU62LIirh/?ref=app Insert 2 nicknames and two options

14th Aug 2018, 7:33 AM
ztonaz
ztonaz - avatar
2 Answers
+ 2
The inputs line 21 and 23 are strings so when you ask p1choice == 1 the result is false even if the player has entered 1 because p1choice is equal to "1" and not 1 (string not integer) so you just have to fix this and I think it will works well :) (add double quotes around the integers)
14th Aug 2018, 7:49 AM
Comsis Alexis
Comsis Alexis - avatar
+ 1
Thanks
14th Aug 2018, 7:58 AM
ztonaz
ztonaz - avatar