Skip to content · ⁨الانتقال إلى المحتوى⁩

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

العربية

موجب، سالب أو صفر

n هو -4. اطبع positive أو negative أو zero — whichever n is.

ثلاثة إجابات تحتاج إلى if، ثم elif، ثم else. يحاول بايثون them بالترتيب ويتوقف عند الأول الذي يكون صحيحاً، لذا فإن الـ else يعمل فقط عندما قال كلا السؤالين أعلاه لا.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP