+ 1

det function and if statements

my understanding is that python reads the lines of code from the top down, so i am surprised when it jumps to line 11 before returning to line 4 i.e i was expecting to enter * or / before asking for a number. i will appreciate suggestions on improving this code https://code.sololearn.com/cUd6AJ252zUx/?ref=app

14th Apr 2018, 5:03 AM
Doe Dare Oladimeji
Doe Dare Oladimeji - avatar
2 ответов
+ 3
You might be getting your error from having two inputs without a variable name attached to thwm
14th Apr 2018, 5:10 AM
Ole113
Ole113 - avatar
+ 3
It runs from up to down. But it does the function only when it is called. So in this case. You need to input the numbers first. And then / or *.
14th Apr 2018, 5:13 AM
Paul
Paul - avatar