+ 1

Python input doesnt wait in order

Py - My input() wants data before my two print lines<which are line 1 and 2 >. Why is this

18th Mar 2022, 6:57 PM
Martin
Martin - avatar
5 ответов
+ 1
G'day Martin you can definitely code, test, and run your calculator program on SoloLearn. You need to know the order of the inputs you will ask for, and then enter them in order on the dialog screen. Eg if you want to chose operator, then operand1 then operands you would input + 39 3 To make life easier on SoloLearn, we often put a comment near the top of the program similar to # expected input: chose(*+/-%), integer1, integer2 When you start coding functions, it is nice to put the same sort of instruction as the first line of the function. Eg: def myFunc(op, num1, num2): # takes(operator and 2 numbers), does calculation, returns number code code code code.....
18th Mar 2022, 9:49 PM
HungryTradie
HungryTradie - avatar
0
I was trying to make a little code to say ("hi choose a mode") also prints next line ("+, " "-, " "*, " "/, "). so i cant have input, then sum two ints, using if else for each "mode" so to speak
18th Mar 2022, 7:09 PM
Martin
Martin - avatar
0
Ohh thanks thats cool, what about writing it in idle
18th Mar 2022, 7:19 PM
Martin
Martin - avatar
0
Go on..
18th Mar 2022, 7:31 PM
Martin
Martin - avatar
0
Thanks appreciate it
18th Mar 2022, 7:42 PM
Martin
Martin - avatar