CBSE Class 11 Informatics Practices
Question 42 of 75
Conditional and Looping Constructs — Question 14
Back to all questionsThe else statement is a default condition that executes when the preceding if and elif (if any) conditions evaluate to False. It does not take any conditions and is written simply as else:, followed by an indented block of code. On the other hand, elif is used to check additional conditions after the initial if statement. If the if condition is False, Python evaluates the elif condition. It is followed by a condition and ends with a colon (:), followed by a block of code.