why does this code generate error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
6 Answers
+ 1
PRO You're missing a closing parentheses on the input line and you have two spellings of the same variable: chances and chance See fixed version in this code link: https://code.sololearn.com/cnO8gud5W7Ju/
14th Dec 2019, 3:18 AM
David Carroll
David Carroll - avatar
+ 3
Lots of errors. Try again, but prove the function of each step before you proceed with the next step. Many of your errors are simple mistakes which can be rectified as you go. Good luck
13th Dec 2019, 8:45 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 2
PRO You need to line up the `elif` with the same indentation level as the `if`
13th Dec 2019, 8:48 PM
David Carroll
David Carroll - avatar
+ 1
...and add a closing parenthesis after int(input() that's all
14th Dec 2019, 1:02 AM
Bilbo Baggins
Bilbo Baggins - avatar
+ 1
14th Dec 2019, 6:26 PM
PRO
PRO - avatar
0
Rik Wittkopp i ve made a few changes here n there...i replaced the for loop with a while loop...i dont know why its still giving an error
14th Dec 2019, 2:39 AM
PRO
PRO - avatar