-4
mensagem_de_modalidade = int (input ('''
Como você quer jogar ?
1)Solo
2)Em dupla
3)Em trio'''))
try :
if mensagem_de_modalidade == 1 :
print ("oi")
if mensagem_de_modalidade == 2 :
print ("hi")
if mensagem_de_modalidade == 3 :
print ("sla")
except :
print ("TESTE")
Maniero answered this in https://answall.com/a/440344/3635, it makes no sense to use Try for something that is not an exception, you have to ask again if you don’t understand something, I commented there where you already asked the first question.
– Guilherme Nascimento
It is that when it enters in the exception of "except" the program shows what it has inside the block and closes. Now if I had used "Else" the program would continue running normally, which I did not want
– Bilbo
@Smaug can you please remove the acceptance of my answer ? When you read the answer and accepted it, it was not correct.
– JeanExtreme002