0

python

can anyone explain why this code is not running as expected ?! https://code.sololearn.com/cdG9CArda1tX/#py

25th Dec 2018, 12:08 AM
Tarek
Tarek - avatar
2 Answers
+ 1
Change line 4 for this: choice = int(input()) And line 7 for this: number = int(input())
25th Dec 2018, 12:15 AM
Diego
Diego - avatar
+ 1
The input is in string, but you compare and use it as an int Cast them to int to make it work int(input())
25th Dec 2018, 12:17 AM
Taste
Taste - avatar