Start learning →
Home › Olympiad (Class 10) › Computer Science › Booleans and Decisions › In Python the else keyword must sit at the same …

In Python the else keyword must sit at the same indentation level as the:

Atry
Bif
Cfor
Ddef
Answer & Solution
Correct answer: B. if
1. The else belongs to the same decision. 2. Its keyword lines up with the opening keyword. 3. That keyword is if. _Source: OpenStax Introduction to Python Programming, Chapter 4._
Practise this question with Quill — Olympiad (Class 10) →
Related questions