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
Novay_Z [31]
2 years ago
10

A programmer is creating an algorithm that will be used to turn on the motor to open the gate in a parking garage. The specifica

tions for the algorithm are as follows. The gate should not open when the time is outside of business hours. The motor should not turn on unless the gate sensor is activated. The motor should not turn on if the gate is already open. Which of the following algorithms can be used to open the gate under the appropriate conditions?
Computers and Technology
1 answer:
Mars2501 [29]2 years ago
5 0

The algorithm which can be used to open the gate under the appropriate conditions is:

  1. Check if the time is during business hours.
  2. If Yes, check if the gate sensor is activated.
  3. If Yes, check if the gate is open.
  4. If it is No, turn on the motor.

<h3>What is an algorithm?</h3>

An algorithm can be defined as a standard formula (procedures) which comprises a set of finite steps and instructions that is typically used for solving a problem on a computer under the appropriate conditions.

This ultimately implies that, an algorithm is a standard, logical formula (procedures) containing the step-by-step rules and instructions for performing a specific task or proffering a solution to a specific problem on a computer system.

In this scenario, the algorithm which can be used to open the gate under the appropriate conditions is:

  1. Check if the time is during business hours.
  2. If Yes, check if the gate sensor is activated.
  3. If Yes, check if the gate is open.
  4. If it is No, turn on the motor.

Read more on algorithm here: brainly.com/question/24793921

You might be interested in
30 POINTS!!
bulgar [2K]

Answer:

online

the answer is online

7 0
3 years ago
What happens if two functions are defined with the same name, even if they are in different arguments within the same .py files?
yan [13]

Answer:

Following are the code to this question:

def data(a):#defining method data that accepts parameter

   print (a)#print parameter value

def data(b):#defining method data that accepts parameter

   print (b)#print parameter value

x=input("enter value: ")#defining variable x that5 input value from user

print(data(x))#call method data

Output:

enter value: hello..

hello..

None

Explanation:

  • As the above code, it is clear defines that python doesn't support the method overloading because More than one method can't be specified in a python class with the same name and python method arguments have no type.
  • The single argument method may be named using an integer, a series, or a double value, that's why we can say that it is not allowed.
7 0
3 years ago
The winning design is typically that which most closely meets the design
zimovet [89]

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answerAnswer:

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answer

Explanation:

7 0
3 years ago
Select the correct text in the passage.
sergejj [24]

Answer:

2. Scientists use seismometers to measure the earthquake activity that occurs beneath a volcano. They then predict the eruption of that volcano.

Explanation:

The options are:

1. Before a volcano erupts, earthquake activity beneath the volcano decreases.2. Scientists use seismometers to measure the earthquake activity that occurs beneath a volcano. They then predict the eruption of that volcano.3. When a volcano erupts, the amount of carbon dioxide and sulfur dioxide emitted decreases. 4.Scientists measure the amount of these gases to determine the amount of magma present in the volcanic reservoir.

The answer is certainly 2. as seismometers are being used to find out the details of the earthquake activities which occur inside a volcano. And with this information, the volcanologists then predict the eruption of that particular volcano. Hence, the 2nd option does not have any factual errors, and all the others have factual errors.

5 0
3 years ago
How do you run a function in python?
Black_prince [1.1K]
You can call a Python function like so: function(parameters).

Example:

Define function add:
def add(x,y):
return x+y

Call function:
add(3,7) -> 10
3 0
4 years ago
Other questions:
  • The tiny memory cards used by digital cameras and mobile devices are an example of ____ storage.
    15·1 answer
  • I REALLY NEED HELP WITH THIS ASSIGNMENT. IT WOULD BE GREATLY APPRECIATED IF SOMEONE HELPED ME. I'M NOT GOOD AT COMPUTER SCIENCE
    6·2 answers
  • PLZZZ HELP ME THIS IS THE THIRD TIME!!! BRAINLIEST AND 50 POINTS What are the advantages and disadvantages of top-down and botto
    9·1 answer
  • Are goals that<br> have concrete criteria for measuring<br> progress toward their attainment.
    5·1 answer
  • What is an advantage and disadvantage to file compression
    8·1 answer
  • Scenes for films are almost always filmed in the same sequence they appear in the script.
    14·1 answer
  • You are a Data Scientist at Anthem Blue Cross Blue Shield. You want to check if a patient will develop diabetes. Please write th
    5·1 answer
  • What is the purpose of a router
    13·2 answers
  • Do you think the current video game industry is likely to experience another “crash” (similar to the one in the 1980s) any time
    10·1 answer
  • A computer hacker trying different combinations of characters to crack a password is a ________.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!