0
why when i use editor for that code didn't print the result automatically and i shoud insert print function first the code is: float (insert('enter a number: ')) + float (insert(' enter another number: ')) when i use this code in IDLE the program prints the result automatically
the get a result in the editor after running the program the should be : print (float (insert('enter a number: ')) + float (insert(' enter another number: ')))
3 Réponses
0
Do you mean something like:
a = float(input('Enter a number: '))
b = float(input('Enter another number: '))
print(a)
print(b)
0
@Dean , No i mean when iam using the editor not IDLE i should change my code to be started with print to get my answer but if i use IDLE i shouldnt use print to get my answer
does python interact with me only when i use IDLE and needs some change in code if i use the editor?
sorry if my question is not clear enough
0
IDLE is the editor mate. I think what you are using is the python shell within the IDLE interface. And no you don't need to use print to output a value on the shell as it automatically outputs all operations that return a value.