1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
baherus [9]
3 years ago
5

A bank uses a computer program during the night to tell if the alarm should ring. Sensors in the bank set the following Boolean

variables:
vaultClosed: set to true if the bank vault is closed; otherwise false
heardNoise: set to true if a microphone heard noise; otherwise false
sawMovement: set to true if a camera saw movement in the bank; otherwise false

The automatic alarm should notify the police if there is noise and movement in the bank, or if the bank vault is open. Which boolean expressions can be used in a selection statement to ring the alarm?
Computers and Technology
1 answer:
Snowcat [4.5K]3 years ago
5 0

Answer:

(vaultClosed OR (heardNoise AND sawMovement))

Explanation:

The first step is to understand the conditions that must be satisfied to alarm notifies the police.

"The automatic alarm should notify the police IF there is noise and movement in the bank, or <u>IF</u> the bank vault is open".

The first IF (bold), sets the first condition which is formed by two sub-conditions: "noise AND movement". The word AND is very important because both sub-conditions must be satisfied, if there is noise but no movement, the the whole condition is not satisfied and the alarm does not notify, and vice versa.

The second IF (underlined), sets the second condition and is about the bank vault is open.

In conclusion, there are two ways to alarm notify the police.

  1. There is noise and movement (must be both)
  2. The bank vault is open

As can be either, the operator OR is used.

(condition 1) OR (condition 2)

Now, condition 1 is formed by two.

<u>FINAL EXPRESSION</u>

(condition 1) OR (condition 2)

((heardNoise equals True AND sawMovement equals True) OR vaultClosed equals True)

<u>REAL CODE</u>

Depending on the programming language you are using, the way to write the expression could vary. If C language is used, the expression would be:

if((heardNoise==1 && sawMovement==1) || vaultClosed==1))

The number 1 refers to the word TRUE

You might be interested in
What is the significant feature of computer capabilities?​
Pepsi [2]
<h2>Hey mate </h2><h2>Here is ur answer..! ⬇️⬇️</h2>

Explanation:

<u>The characteristics of computers that have made them so powerful and universally useful are speed, accuracy, diligence, versatility and storage capacity. Let us discuss them briefly. Computers work at an incredible speed.</u>

<em><u>Hope</u></em><em><u> </u></em><em><u>it helps</u></em><em><u> </u></em><em><u>u plzz</u></em><em><u> </u></em><em><u>mark it</u></em><em><u> </u></em><em><u>as brainalist</u></em><em><u> </u></em><em><u>and thnk</u></em><em><u> </u></em><em><u>my answers</u></em><em><u> </u></em>

4 0
3 years ago
Assuming a 32bit processor If I have a double pointer defined as dPtr and I add 1 to it. How many bytes are added to the address
Anni [7]

Answer:

Theoretically one could design an architecture that would address 16 GB of memory with 32-bits of unique addresses.

Explanation:

4 0
2 years ago
As a compositional mode for electronic? media, __________ help people find their way through an unfamiliar system or? subject; t
maks197457 [2]
The answer that fills in the blank is orientation. It is because orientation does not provide all the details of what they are doing but a guideline of what they must do, in order for them to be guided on the things that they need to learn as they start. They require proper guidance which is the orientation before performing before hand. Especially when they are not familiar on what they need to do.
3 0
2 years ago
Complete the program by writing and calling a function that converts a temperature from Celsius into Fahrenheit. Use the formula
Rina8888 [55]

Answer:

C = int(input("Enter a number ::))

F = (C * (9 /5)) + 32

print(" {} in Fahrenheit is {} ". format(C, F))

Explanation:

The program takes an input from the user and converts the input to a fahrenheit.

4 0
3 years ago
Help help help help help help
Shkiper50 [21]

Answer:

maybe overexposure???

Explanation:

6 0
2 years ago
Other questions:
  • What is the easiest way to be sure you have selected all of the content related to a specific tag?
    11·1 answer
  • Which of the following is an example of a Boolean operator?
    8·1 answer
  • Need help with just #8
    12·1 answer
  • For a line segment, show that clipping against the top of the clipping rectangle can be done independently of the clipping again
    7·1 answer
  • Elisa and Josh need to access General Help. Elisa will press the F1 key. Josh will click on ? in the upper-right corner of the W
    14·2 answers
  • Which of these is the function of a modeler?
    5·2 answers
  • Which of the following is the correct binary representation of the number 2?
    14·1 answer
  • What are 25 items that trees made?
    6·2 answers
  • Derek has to create a technical design of a complex floor plan using CAD. What will be most helpful for Derek to use to create t
    8·1 answer
  • GRAND THEFT AUTO 5 LOLLL
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!