0
My calculator. Can you fix the error of printing unnecessary lines.
2 Réponses
+ 3
You can pass in end= to set the end character(s) for the print function. The default is a newline character '\n'.
So to change it to a space you would do something like:
print("Hello", end=' ')
print("World")
0
I didn't see any extra lines just a single quote on line 2 before the Enter
*
2
3
/
4
2
0
gave me:
'Enter (+-*/) or 0 to quit: x = y = Result: 6.0
'Enter (+-*/) or 0 to quit: x = y = Result: 2.0
'Enter (+-*/) or 0 to quit: