+ 3
Can't fix the error. Anyone??
2 Answers
+ 6
The spaces were messed up, and the while loop was broken too
https://code.sololearn.com/cTQf1iirHjQa/?ref=app
+ 4
It needs to look like this (note the indentation):
while condition:
if condition:
do_something()
elif condition:
do_something()
elif condition:
do_something()
Your variable "ans" doesn't do anything. You could use it to break the loop:
if user_input == '':
ans = False