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
trapecia [35]
4 years ago
7

3.14 LAB: Simple statistics for Python

Computers and Technology
1 answer:
Ad libitum [116K]4 years ago
8 0

Answer:

Following are the correct python code to this question:

n1 = float(input('Input first number: '))#input first number  

n2 = float(input('Input second number: '))#input second number  

n3 = float(input('Input third number: '))#input third number  

n4 = float(input('Input fourth number: '))#input fourth number  

average = (n1+n2+n3+n4)/4 #calculate input number average

product = n1*n2*n3*n4 # calculate input number product

print('product: {:.0f}  average: {:.0f}'.format(round(product),round(average))) #print product and average using round function

print('product: {:.3f}  average: {:.3f}'.format(product,average)) #print product and average value

Output:

Please find the attachment.

Explanation:

The description of the above python code can be defined as follows:

  • In the above python program four variable "n1, n2, n3, and n4" is defined, in which we take input from the user end, and in these user inputs we use the float method, that converts all the input value in to float value.
  • In the next step, two variable average and product are defined, that calculate all input numbers product, average, and hold value in its variable.
  • In the last line, the print method is used, which prints its variable value by using a round and format method.

You might be interested in
drag each type of document to the correct location on the table. Drag each document to its respective category
trapecia [35]

Answer:

What? I don't get it.

Explanation:

4 0
3 years ago
With a(n) ____ you can arrive at a scene, acquire the data you need, and return to the lab as quickly as possible.
valkas [14]

Answer:

Your answer is initial-response field kit

Explanation:

7 0
2 years ago
How to turn off new macbook pro when it is frozen 2017
Maksim231197 [3]
To unfreeze the mac book pro, there are two ways :
a. <span>Click the apple logo which is at the top left of the menu bar and then select 'force quit'.
b. Hold down the option, command, and escape buttons and then select 'force quit'. </span>
If all else fails, best option is to hold down the power button on the keyboard till it shuts down.
3 0
4 years ago
Read 2 more answers
Choose the correct definition for Conditional Statement A. Affects the sequential flow of control by executing different stateme
Sliva [168]

Answer:

A: Affects the sequential flow of control by executing different statements based on the value of a Boolean expression

Explanation

because the real definition is Definition. A conditional statement is a statement that can be written in the form “If P then Q,” where P and Q are sentences. For this conditional statement, P is called the hypothesis and Q is called the conclusion. Intuitively, “If P then Q” means that Q must be true whenever P is true. And A, explain that.

5 0
3 years ago
Read 2 more answers
In “Plugged In,” the author’s purpose is to persuade. Which of the following quotes from the text shows that the author’s purpos
lisabon 2012 [21]

The quote from the text that shows that the author’s purpose is to persuade is D. Critics say that kids stare at computers and TVs all day and do not get enough exercise. The facts stand in counterpoint to this belief.

An argumentative writing prompt is written in order to convince the readers about a particular issue.

According to the author, the fact that children are involved in watching movies, playing games, listening to music, etc doesn't mean that they can't still be productive.

There are some critics that believe that kids stare at computers and TVs all day and do not get enough exercise. This was countered by the author who stated that kids can still engage in exercises or do other productive things.

Read related link on:

brainly.com/question/24861556

3 0
2 years ago
Other questions:
  • When did the silver market drop sharply, hurting Bolivia's income?
    7·2 answers
  • Describe how using active listening at work can help you be a better employee.
    15·1 answer
  • The collection of all possible vulnerabilities that could provide unauthorized access to computer resources is called the:
    12·1 answer
  • Which of the following statements is true?
    8·1 answer
  • Please help me answer this question
    14·1 answer
  • Any material that comes into contact with the body must be __________.
    6·1 answer
  • Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named ga
    12·1 answer
  • Most presentation programs allow you to save presentations so they can be viewed online by saving them as ____
    5·2 answers
  • Horizontal and vertical scaling usually refer to increasing the capacity of
    6·1 answer
  • PLEASE HELP ME!!! I REALLY NEED YOU TO HELP ME NOW!!!! THANKS!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!