In a situation where you want to perform one action when a Boolean expression evaluates as true and an alternate action when it evaluates as false, otherwise known as a dual-alternative decision, what sort of statement should you use?
1 answer:
Answer:
if-else
Explanation:
Based on the information provided within the question it can be said that the best statement to use in this situation is an if-else statement. Like mentioned, this is a statement that outputs two different results depending on whether or not the input meets a predefined set of rules.
For Example: Input is 17
if (hour < 18) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
Output would be "Good evening" in this situation
You might be interested in
Answer:
growing even though the fertility rate is decreasing
Explanation:
we know about our past all over people had not be educated even their fertility rate ll
Answer:
The first colony was founded at Jamestown, Virginia I'm pretty sure
Answer: false
Explanation:
there are better ways to prevent children from accessing the gun
The best answer is The amazon rainforest located in a brazil and its cover the northwestern part of brazil
Answer:
isolationist
Explanation: