Skip to content · ⁨Pular para o conteúdo⁩

Positive, negative or zero · ⁨Positivo, negativo ou zero⁩

English

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.

Português

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.

Log in or create account · ⁨Entrar ou criar conta⁩

IGCSE, A-Level & AP