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
Helen [10]
2 years ago
11

Write an algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius.

Computers and Technology
1 answer:
noname [10]2 years ago
3 0

Answer:

The algorithm for switching off the electric water heater automatically when the temperature rises to 70 o Celsius is given below.

Explanation:

Let use python code for this question.

we will use if statement to check the condition if the temperature is greater than 70.

When the temperature is 70, then the algorithm will send signal to hardware to turn yourself off.

if(temperature==70):

      print("send_turn_off_signal")

You might be interested in
Return the "centered" average of an array of ints, which we'll say is the mean average of the values, except ignoring the larges
denpristay [2]

Answer:

The code to this question can be defined as follows:

public double centeredAverage(ArrayList<Integer> nums) //defining a method centeredAverage that accepts an array nums

{

   if ((nums == null) || (nums.size() < 3))//define if block for check simple case value

   {

       return 0.0;//return float value

   }

   double sum = 0; //defining a double variable sum

   int smallest = nums.get(0);//defining integer variable and assign value

   int largest = nums.get(0);//defining integer variable and assign value

   for (int i = 0; i < nums.size(); i++) //defining for loop for stor ith value

   {

       int value = nums.get(i);//defining integer value variable to hold nums value

       sum = sum + value;//use sum variable for add value

       if (value < smallest)//defining if block to check value less then smallest

           smallest = value;//hold value in smallest variable  

       else if (value > largest)//defining else if block that checks value greater them largest value

           largest = value; //hold value in largest variable

   }

   sum = sum - largest - smallest;  // use sum to decrease the sum largest & smallest value

   return (sum / (nums.size() - 2)); //use return keyword for return average value

}

Explanation:

In the question, data is missing, that's why the full question is defined in the attached file please find it.

In the given code a method "centeredAverage" is used that accepts an array in its parameter and inside the method, if block is used that checks the cash value if it is true, it will return a float value.

In the next step, two integers and one double variable is defined, that use the conditional statement for check hold value in its variable and at the last use return keyword for return average value.

3 0
3 years ago
The page that appears when you first open your Internet browser is the _____.
Leni [432]

Answer:home page

Explanation:

7 0
2 years ago
Who<br> invented the term “debugging”?
Black_prince [1.1K]

Grace Murray Hopper invented it

8 0
3 years ago
Read 2 more answers
If a while loop iterates forever,what is the most likely cause?
miv72 [106K]

Answer:

Runtime error probably. The program won't make it past the while loop in the code.

5 0
2 years ago
How do you start using the Internet?
fgiga [73]

Answer:

it's

D. open web browser

3 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • _____ are considered to be the most important element in a computer-based information system.
    8·1 answer
  • #We've started a recursive function below called #measure_string that should take in one string parameter, #myStr, and returns i
    5·1 answer
  • TCP is the protocol responsible for the delivery of data on the Internet, and IP provides addresses and routing information.
    12·1 answer
  • Tasks:_______.
    7·1 answer
  • In terms of object-oriented programming, after a class is defined,
    11·1 answer
  • True or False: <br> The object reference can be used to polymorphically store any class in Java.
    13·1 answer
  • What is the difference between a try block and a try statement? Group of answer choices There is no difference; the terms can be
    6·1 answer
  • Write a C program that uses a while statement to determine and print the largest of 10 numbers input by the user. Your program s
    6·1 answer
  • Select the correct answer from each drop-down menu. A company is recruiting for a web designer. What kind of candidate should th
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!