Printing multiple messages when there is no input | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Printing multiple messages when there is no input

Is there a way to print multiple messages when there is no input. User_input=input() if not User_input: print("Please enter first value") else: print(User_input) User_input2=input() if not User_input2: print("Please enter second value") else: print(User_input2) If I enter no input or only enter the first input, the second message doesn’t get printed. Is there a way to fix this?

23rd Jun 2020, 4:47 AM
•—• • •-• ••• —- -•
•—• • •-• ••• —- -• - avatar
1 Answer
0
Cannot reproduce that, for me it works, as script and even on sololearn code playground.
23rd Jun 2020, 5:01 AM
Sandra Meyer
Sandra Meyer - avatar