COMPUTER FUNDAMENTALS

COMPUTER APPLICATIONS

DATABASE MANAGEMENT SYSTEMS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A branching structure that has more than 2 (two) conditions can use the command ____
A
for atau while
B
if
C
if-else
D
if-elif-else
E
elif
Explanation: 

Detailed explanation-1: -Multiple if’s means your code would go and check all the if conditions, where as in case of elif, if one if condition satisfies it would not check other conditions..

Detailed explanation-2: -Test multiple conditions with a single Python if statement To test multiple conditions in an if or elif clause we use so-called logical operators. These operators combine several true/false values into a final True or False outcome (Sweigart, 2015).

Detailed explanation-3: -The elif statement allows you to check multiple expressions for TRUE and execute a block of code as soon as one of the conditions evaluates to TRUE. Similar to the else, the elif statement is optional.

There is 1 question to complete.