0
New to python and Solo learn
I’m not sure if I’m doing the right thing by posting this here, if it’s wrong I apologise in advance.. Pls feel free to tell me what’s the right way to ask this question https://code.sololearn.com/cw4BZdZat2nz/?ref=app I’m very new to programming and from what I read so far, I’ve written this, I seem to be getting errors which I don’t know how to solve, could any one please help me ?
6 ответов
+ 1
1. Add a level of indentation to line 29. Also, there's a missing closing parentheses.
else:
print ('Sorry kiddo, you need to wait another ' + str(18 - int(Age) + ' years to be eligible to apply for a driving license!!'))
2. Break statements need to go inside a loop.
3. What are lines 12-13 supposed to do?
+ 1
Thank you Diego for spending your time to help me !
the purpose of line 12-13 is that if the user gives a blank entry, the programs re runs untill a new input is given by the user, it runs in a loop and keeps re asking for the input unless the user gives an input that is one charecter or more in length
+ 1
In that case, lines 12-13 aren't needed at all. The while loop condition does the job.
+ 1
It's an "if" condition. Adding it to the while loop is irrelevant since a string with length >= 1 is not an empty string (the while loop condition).
0
is line 12-13 not a loop?
0
ohoooo thank you sir ! ill look into how to rectify it