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
How would you copy and paste?
BartSMP [9]

first you do ctrl c then you do ctrl v

4 0
2 years ago
Read 2 more answers
The computer-like model used to describe the way humans encode, store, and retrieve information is the ________ model.
FinnZ [79.3K]

Answer:

Information processing model

<em>Hope it helps!</em>

3 0
2 years ago
I didn't go to school today and i want to know if my teacher would contact my parents.
AURORKA [14]

the school will call your parents

6 0
3 years ago
What type of firmware should you look for on a pc if you want the computer to support gpt partitions?
Ilia_Sergeevich [38]

Answer:

UEFI

Explanation:

7 0
1 year ago
write c++programs for the following problem: Let the user enter two numbers and display which is greater. please help!
zmey [24]

Program to display greater number:


#include <iostream>                     <em>// Needed to perform IO operations    </em>

#include<conio.h>                     <em>  // header file</em>

using namespace std;  


int main()                                        //start of the program

{

   int a , b =0;                         //initialising the two integer variable

   cout<< "Enter first number"<<endl;  

    cin >> a;                                     //user's first number

    cout<< "Enter second number"<<endl;

    cin >> b;                                    //user's second number

     if (a>b)                       //comparing the two integers input by user

  cout<<  a << "is greater than" << b;    //display the greater number

    else

  cout<<  b << "is greater than" << a;                

return 0;                                                               // exist

}


     

3 0
3 years ago
Other questions:
  • Framing can create which of the following in a photograph? Mystery Saturation Aperture All of the above
    10·2 answers
  • In how many ways can the letters of the word APPROXIMATION be arranged?
    12·1 answer
  • 16.
    7·1 answer
  • "PindCart, an online retailer, places a small file on the computer hard drive of its visitors to recognize them when they revisi
    7·1 answer
  • Using the phase plane program, plot the phase plane for the Lotka-Volterra model:
    11·1 answer
  • Which command would you use to swap the words hither and yon on any line with any number of words between them? (You need not wo
    5·1 answer
  • While you are working on your computer, it shuts down unexpectedly, and you detect a burning smell. When you remove the case cov
    10·1 answer
  • Describe the function<br>ms word, Acess, Elexel, Power point<br>Publisher and Outlook​
    14·1 answer
  • In addition to developing sketches, computer-aided design programs are used by fashion designers to perform which task?
    10·1 answer
  • Which of the following is a key feature of a relational database?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!