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

3.14 LAB: Simple statistics for Python

Computers and Technology
1 answer:
Ad libitum [116K]3 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
Explain why the program did not print "clap", and how to fix it.
lara [203]

Answer:

Because you're using "elif".

If I were to have this code:

if *blank*:

    *action 1*

elif *blank*:

    *action 2*

If and elif is basically saying "one or the other". Since 10 is >= 2, it prints out only whistle. Instead of elif, you were to replace them all with "if", it would print out:

whistle

snap

clap

6 0
2 years ago
In the Word 2016 window, where is the Status bar located?
klasskru [66]

Answer:

I hope this helps

Explanation:

The answer is B

4 0
2 years ago
WILL UPVOTE NEED ANSWERS ASAP i have till 4:30
deff fn [24]
B. Summer monsoons bring heavy rainfall and winter monsoons create dry and arid conditions.
6 0
3 years ago
Help brainleist giving exam
Digiron [165]

Explanation:

11. True

12: Electronic Fund Transfer

13. True

14. I'm not sure but I think yes?..

(I'm not sure if your including number 15 but just in case, the full form of PIN is personal identification number)

4 0
2 years ago
Someone please help! Please fill this out
solmaris [256]
A Would be the answer, Sir.!
5 0
3 years ago
Other questions:
  • An administrator working on a Windows Server 2016 Server Core installation needs to disable DHCP on all interfaces on the server
    12·1 answer
  • Which of the following is an example of a good listening skill? A. Replying to the caller as "you" rather than using his or her
    9·2 answers
  • Encyclopedia.com is considered to be
    15·1 answer
  • Differentiate among web apps, mobile apps, and mobile web apps.
    14·2 answers
  • Why does the phrase "compatibility mode” appear when opening a workbook?
    6·2 answers
  • What data discovery process, whereby objects are categorized into predetermined groups, is used in text mining?
    12·1 answer
  • What your computer can do to you?
    14·2 answers
  • A user reports that he cleared a paper jam and now cannot print. The technician reseats the paper and then prints a test page fr
    14·1 answer
  • Describe the difference between a myth and a fable.
    12·1 answer
  • Edge is a video game featuring interactive extreme sports. The graphics used in the game are protected by
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!