Which control structure allows the checking of multiple expressions for truth value and executing a block of code as soon as one of the conditions evaluates to true?
- for loop
- if-elif-else
- switch-case
- while loop
The if-elif-else control structure allows the checking of multiple expressions for truth value. It executes the block of code associated with the first true condition and then exits the structure.
Loading...
Related Quiz
- Which keyword is used to define a function in Python?
- A function in Python can return multiple values using a _______.
- To enable database migrations in Flask, the ____ extension can be used.
- When working with large files, why might the readlines() method not be the most memory-efficient?
- How would you optimize a Python function that is found to be CPU-bound during profiling?