88.6k views
4 votes
When should else be used in programming?

Group of answer choices

if something should be repeated several times

in a non-conditional statement

to describe what should happen when the condition of an if statement isn’t met

to begin an infinite loop

2 Answers

3 votes

Answer:

he is correct

Step-by-step explanation:

User Miral
by
6.1k points
6 votes

Step-by-step explanation:

The else statement is usually used when computations are still required when a condition is not met in an if and else-if statement, so the correct option is the fourth one: "to describe what should happen when the condition of an if statement isn't met".

Hope this helps :)

User Chris Melville
by
5.8k points