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
Makovka662 [10]
3 years ago
10

Write a program that calculates the average of 4 temperatures. Function 1--write a function to ask a user for 4 temperatures and

return them to main. Validate that none of them is negative. Also return a boolean indicating that the data is good or bad. Function 2--write a value-returning function to calculate the average and return it as a double if the data is good. Display an error message if any score was negative.
Computers and Technology
1 answer:
Andrews [41]3 years ago
7 0

Answer:

Answered below

Explanation:

Answer written in Python programming language

temp_list = []

count = 0

sum = 0

n = 0

is_good = True

def temperatures(temp1, temp2, temp3, temp4){

temp_list = [temp1, temp2, temp3, temp4]

for i in temp_list:

if i < 0:

is_good = False

break

return is_good

}

def average ( ){

if is_good:

for i in temp_list:

sum += i

count++

average = sum / count

return average

}

You might be interested in
Write 4 types of network_based<br>on geographical area covered<br>by them​
ikadub [295]

Answer:

Network based coverages are LAN, WAN, MAN and WLAN

4 0
3 years ago
Susan is troubleshooting a problem with a computer's network cabling. At which layer of the Open Systems Interconnection (OSI) R
Alisiya [41]

Answer:

Physical layer

Explanation:

The physical layer is responsible for the physical cable or wireless connection.

6 0
3 years ago
Linda is viewing the campaign report in her Google Ads account after successfully implementing conversion tracking tags for her
anyanavicka [17]

Answer:

Option 1 and Option 3 are correct.

Explanation:

Linda is displaying that marketing update within the Google Advertising profile after effectively installing transformation monitoring tags to its site. She saw that slightly two of her advertising are created by the following View-through transformations.

Thus, somebody seeing up towards Thirty seconds of such advertisements as well as anyone clicking on a portion of such advertising as View-through transformations.

6 0
3 years ago
Which setting indents all but the first line of a paragraph by the selected length?
Phoenix [80]

Answer:

Hanging

Explanation:

5 0
3 years ago
_____ are used to associate a style sheet or style rule with a specific device or list of device features.â
Usimov [2.4K]
Media queries are used to associate a style sheet or style rule with a specific device or list of device features<span> .This technique is used for delivering a tailored style sheet to different devices and applying </span><span>CSS styles depending on a device's general type, specific characteristics  or environment.
</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • The numbers on the bottom of a typical check represent all of the following EXCEPT?
    12·2 answers
  • How is an orthographic drawing similar or different from an isometric drawing
    12·1 answer
  • Which biometric technique is considered nearly infallible from a scientific point of view and is increasingly preferred by crimi
    8·1 answer
  • _____ is a component of a data model that defines the boundaries of a database, such as maximum and minimum values allowed for a
    12·1 answer
  • Which function of InfoSec management encompasses security personnel as well as aspects of the SETA program?
    5·1 answer
  • While you work on the customer’s printer, he continues chatting about his network and problems he’s been experiencing. One compl
    14·2 answers
  • Define a void function that calculates the sum (+), difference (-), product (*), quotient (/), and modulus (%) of two integer nu
    14·1 answer
  • True/False/Unknown. For the interpretation of function calls, we assign the formal parametersto the valuations of the actual arg
    11·1 answer
  • What is ‘Software Quality Assurance’?
    10·1 answer
  • A local bank has just one branch. It sets up a peer-to-peer network for all devices on the system. The bank would like to be abl
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!