Ask Question
15 May, 02:51

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
Answers (1)
  1. 15 May, 06:10
    0
    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
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In a situation where you want to perform one action when a Boolean expression evaluates as true and an alternate action when it evaluates ...” in 📘 Social Studies if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers