Positive, negative or zero · Positivo, negativo ou zero
Positive, negative or zero
n is -4. Print positive, negative or zero — whichever n is.
Three answers need if, then elif, then else. Python tries them in order and stops at the first one that is true, so the else only runs when both questions above it said no.
Positivo, negativo ou zero
n é -4. Imprima positive, negative ou zero — qual quer que seja o n.
Três respostas precisam de if, depois elif, depois else. O Python as tenta na ordem e para na primeira que for verdadeira, então o else só executa quando ambas as perguntas acima disseram não.
n is -4. Print positive, negative or · ou zero — whichever n is. · n é -4. Imprima positive, negative ou zero — qual quer que seja o n.
Click Run to see the output here. · Clique em Executar para ver a saída aqui.