+ 2

if random number is 4 or 5 my code doesn't give output .why?

https://code.sololearn.com/cWY68irC8Kjm/?ref=app

6th Apr 2018, 6:51 PM
aditya
aditya - avatar
7 Answers
+ 1
7th Apr 2018, 5:03 PM
John Wells
John Wells - avatar
+ 2
Your code doesn't output in the case of a tie so r of 2 and s of 'stone' won't output anything. Therefore, 'paper' and 4 won't output either.
6th Apr 2018, 7:11 PM
John Wells
John Wells - avatar
+ 2
John Wells is right!
6th Apr 2018, 8:43 PM
Parker king
Parker king - avatar
+ 1
John Wells where is the condition of tie is occurring?
7th Apr 2018, 4:43 PM
aditya
aditya - avatar
+ 1
John Wells where is the condition of tie is occurring?
7th Apr 2018, 4:44 PM
aditya
aditya - avatar
+ 1
John Wells thanks ...i totally forgot about that condition!!â˜șâ˜ș
7th Apr 2018, 5:11 PM
aditya
aditya - avatar
0
Use (if)...(else if)...(else if)...(else) instead of (if)...(if)...(if)...(else).
6th Apr 2018, 7:07 PM
Bartosz Pieszko
Bartosz Pieszko - avatar