Skip to content

Positive, negative or 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.

Log in or create account

IGCSE, A-Level & AP