Mar-05-2019, 02:15 AM
(This post was last modified: Mar-05-2019, 02:15 AM by ClassicalSoul.)
Hi, how do make it so that a blank space precedes an input() function, and even more specifically, how would I make it so that this applies only to the final line?
text = '' while text != 'quit': text = input('Please enter a number (or \'quit\' to exit):') if text == 'quit': print('...exiting program') elif text.isnumeric() == True: print(x + 2) elif text.isnumeric() == False: print('That is not a number.', end = '')What I want to fix (look how it's all smudged together):
Please enter a number (or 'quit' to exit):j That is not a number.Please enter a number (or 'quit' to exit):