Start learning →
Home › Olympiad (Class 10) › Computer Science › Booleans and Decisions › A curve program uses two separate if statements …

A curve program uses two separate if statements and both run by mistake. The fix is to use:

Aexit
Beval
Celif
Dendif
Answer & Solution
Correct answer: C. elif
1. Separate ifs are each tested on their own. 2. Chaining makes later tests run only when earlier ones fail. 3. So use elif. _Source: OpenStax Introduction to Python Programming, Chapter 4._
Practise this question with Quill — Olympiad (Class 10) →
Related questions