Computer Science, asked by 512076, 5 days ago

Evaluate the fo Boolean Operations and Expressions
1. Using Boolean notation, write an expression that is a I whenever one or more of its variables
(A, B, C, and D) are Is.llowing operations 0+0+1

Answers

Answered by Shubhampro112
0

Answer:

As humans, we make decisions every day, like what to eat for lunch or whether to wear a raincoat. When we make those decisions, we consider many conditions of our world, like the contents of our fridge for the lunch decision, or the weather outside for the raincoat decision.

Computer programs also make decisions, using Boolean expressions (true/false) inside conditionals (if/else). Thanks to conditionals, programs can respond differently based on different inputs and parameters.

A simple conditional

Imagine we're writing a program to help us decide what to wear outside each day. There are a lot of conditions we can come up with this program, but let's start simple: if the temperature is below freezing, the program should warn us to wear a snow jacket.

Here's that logic in a flowchart:

Flowchart that starts with diamond that says "Is temperature less than or equal to 32?". Diamond has arrow labeled "TRUE" that leads to rectangle that says "Display: "Wear a snow jacket!".

Flowchart that starts with diamond that says "Is temperature less than or equal to 32?". Diamond has arrow labeled "TRUE" that leads to rectangle that says "Display: "Wear a snow jacket!".

[How do you read a flowchart?]

We can program that flow in JavaScript using an if statement:

if (temperature < 32) {

 println("Wear a snow jacket!");

}

Similar questions