Why result is Empty?

print ("the Document contains information intended for persons over 18 years!")
year = int (input("How old are you: "))
result = None 

if year > 18 :
 result = "loading.."

elif year < 18:
 result = "You're under 18!"
 print (result)
June 3rd 19 at 20:25
2 answers
June 3rd 19 at 20:27
Well it's quite simple. year = 18. Both conditions fail.

Use if year >= 18: and just else:
June 3rd 19 at 20:29
the issue has been resolved

Find more questions by tags Python