0
Guys, 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 just opens and quickly closes itself, without me even being able to do anything on it.
I’m starting to learn Python and programming now, so it’s likely I made some stupid mistake, like a syntax thing, but I can’t notice what it is.
Well, I just created the script to test some things with Python, and from what you might have noticed, it’s something simple.
The user puts their age and the script says whether the person can drive legally or not. I just want to solve the script, actually, 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?