People, I have a slight problem with a script I created in Python.
print("Agora eu vou dizer algo para você.")
idade = int(input("Me diga sua idade."))
if idade < 18
print("Me desculpe, você não pode dirigir.")
else
print("Que bom, você pode dirigir!")
wait = input("Aperte qualquer tecla para sair do CMD.")
exit
The problem is: when I run it, it simply opens and quickly closes alone, without me even being able to do anything in it.
I'm starting to learn Python and programming now, so it's likely that I've made some stupid mistake, like some syntax, but I can not figure out what it is.
Well, I just created the script to test some things with Python, and from what you may have noticed, it's something simple.
The user sets his or her age and the script says whether the person can legally or not. I just want to solve the script, in fact, more to know what my mistake was and not to do it in the future, because the script itself is totally useless. So what would be the problem in the script that causes it to close itself?