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]
4 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]4 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
When entering a formula or function into a cell, most spreadsheet programs require that you begin with some type of symbol, usua
olga_2 [115]
This is a false statement, if that's the question.
4 0
3 years ago
Describe the role of a distributed file system in a job execution environment such as MapReduce in a large-scale cloud system. g
Bezzdna [24]

Answer:

allows users of physically distributed systems to share their data and resources

Explanation:

The main purpose of the Distributed File System (DFS) is to allows users of physically distributed systems to share their data and resources

6 0
2 years ago
What features could be improved in microsoft word?
Korolek [52]

Word (and the rest of the Office suit) suffers from feature creep and legacy cruft. This is a difficult problem because with so many users, removing features is impossible without upsetting a lot of people.

One option would be to split Word into two products: One, called Word, would be a completely new product with a clear focus on the experience of writing and formatting text. This would require ruthlessly cutting out any parts that don't support this goal, including some backwards compatibility.

The other product, called Word Classic, would maintain all the cruft that some people feel they might need. Since the experience would be so much worse, and the new Word would be more prominently displayed in the Office suit, this would help Word users gradually transition to the new product.

7 0
3 years ago
A computer application such as Microsoft Access that is used to store data and convert it into information is a ________________
lorasvet [3.4K]
All data is stored in table
5 0
4 years ago
How to help it automation with python professional certificate?
arlik [135]

Answer:

Following are the answer to this question:

Explanation:

As we know, that Python is based on Oop's language, it allows programmers to decide, whether method or classes satisfy the requirements.  

  • It's an obvious benefit, in which the system tests the functions, and prevent adverse effects, and clear the syntaxes, which makes them readable for such methods.
  • All the framework uses the python language, that will be used to overcome most every coding task like Mobile apps, desktop apps, data analyses, scripting, automation of tasks, etc.
3 0
3 years ago
Other questions:
  • Convert 234.43 (base 7) to base 10
    7·1 answer
  • What are the main types of software? Explain with appropriate examplesWhat are the main types of software? Explain with appropri
    12·2 answers
  • Submitting a cover letter and resume is a step in the process of applying for a job.
    14·1 answer
  • Character positions in<br> arrays start counting with<br> the number 1.<br> True<br> False
    14·1 answer
  • Yooooooooooooooo
    5·2 answers
  • Different the need for external or secondary memory​
    12·1 answer
  • All languages require the code which is simply a word that means _____.
    9·1 answer
  • Briefly the conceptual model of effective computer based instruction for adults outlining three units (output, Process and input
    9·1 answer
  • A ________ is a small, lightweight, power-conserving, computing device that is capable of wireless connectivity.
    6·1 answer
  • Why should you make sure the paper being used in a printer is dry and not damp?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!