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
Please check my answer! (Java)
marin [14]

Yep. 4 rows of 5 stars each.

8 0
3 years ago
Case 1-1Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and
pantera1 [17]

Answer:

The answer is Live Preview.

Explanation:

<em>Live Preview is a Powerpoint tool that helps the user to find out how a singular choice will change the appearance of the presentation, without committing any change. This application allows the user to edit any slide and see the changes without any risk of damaging the rest of the presentation.</em>

<em>It lets the user see how an actual change will look on the slide  object before the user decides to accept or decline the change.</em>

<em>It is a powerful resource, because we know how handful it is to prepare a powerpoint presentation.</em>

3 0
3 years ago
When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means
kozerog [31]

Answer:

When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means

Explanation:

When the CPU executes the instructions, it interprets the opcode part of the instruction into individual microprograms, containing their microcode equivalents. Just so you know, a full assembly instruction consists of an opcode and any applicable data that goes with it, if required (register names, memory addresses).

The assembly instructions are assembled (turned into their binary equivalent 0s and 1s, or from now on, logic signals). These logic signals are in-turn interpreted by the CPU, and turned into more low-level logic signals which direct the flow of the CPU to execute the particular instruction.

8 0
3 years ago
Which device protects computer systems from voltage fluctuations?
meriva
A fuse protects computer system from voltage fluctuations
6 0
3 years ago
Read 2 more answers
How does a router handle a packet destined for a network that is not listed in the routing table?
kogti [31]
The packet is dropped or discarded. By default, a router will send packets to a network that has been listed in the routing table. If it happens that the network is not listed, the packet will be discarded or dropped. Packets that do not have a default route or gateway of last resort are dropped.

 






5 0
3 years ago
Other questions:
  • Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that both adds
    6·1 answer
  • Explain Cascading Style Sheets and what they do. Describe their primary function, two effects that this function has on programm
    11·1 answer
  • Why is exception handling an issue for testers in object-oriented developments?
    15·1 answer
  • HI GIVING BRAINLIEST Tyra used the software development life cycle to create a new game. She released it to her friends in order
    14·2 answers
  • Insert the components that the computer uses to perform the tasks of each of the parts:
    13·1 answer
  • "_____ devices improve memory by encoding items in a special way."
    13·1 answer
  • According to which virtue do you need to secure information by limiting computer access to authorized personnel only?
    6·1 answer
  • Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
    12·1 answer
  • Write in language C, please.
    8·1 answer
  • What bonnie is this? From five night at freddys
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!