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

Part 1 Given 3 integers, output their average and their product, using integer arithmetic. Ex: If the input is 10 20 5, the outp

ut is: 11 1000 Note: Integer division discards the fraction. Hence the average of 10 20 5 is output as 11, not 11.666666666666666. Submit the above for grading. Your program will fail the test cases (which is expected), until you complete part 2 below but check that you are getting the correct average and product using integer division. Part 2 Also output the average and product, using floating-point arithmetic. Ex: If the input is 10 20 5, the output is: 11 1000 11.666666666666666 1000.0
Computers and Technology
1 answer:
MaRussiya [10]3 years ago
6 0

Answer:

a = int(input("Enter first number: "))

b = int(input("Enter second number: "))

c = int(input("Enter third number: "))

avg = (a + b + c) / 3

product = a * b * c

print(str(int(avg)) + " " + str(product))

print(str(avg) + " {:.1f}".format(product))

Explanation:

*The code is in Python

Ask the user for three integers, a, b, and c

Calculate their average, sum the numbers and divide by 3

Calculate their product

Print avg and product as integer numbers, be aware that I type casted the avg to int

Print avg and product as floating point numbers, be aware that I used format method to print one decimal for product

You might be interested in
A measure of the processing power of a computer
IgorLugansk [536]
<h2>Million instructions per second (MIPS)</h2>

Explanation:

Real-life example of measurement:

Like how we measures vegetables & fruits in Kilograms, how we measure water or other liquids in liters, we measure the processing power of a computer with the help of unit called MIPS.

What is processing power?

The number of instruction that a computer can process in one second helps us to calculate the "speed of the computer".

This can also be termed as measuring the clock speed. Its measured in Giga hertz or mega hertz.

Why this is necessary?

  • It is to pick the best system to buy. (Also considering the need an budget)
  • Purchasing system based on the requirement.

6 0
4 years ago
What is a computer OPERATING SYSTEM?
Alex17521 [72]

Answer:

A computer OPERATING SYSTEM is a system software that manages computer hardware, software resources, and provides common services for computer programs.

Explanation:

5 0
4 years ago
A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
Nadusha1986 [10]
A. hub

I can't think of a good reason to use a hub anymore, I always use a switch instead.
3 0
3 years ago
Edmentum Question- Consumer and Credit Loans
Alina [70]

Answer:

D, if the debtor fails the means test

Explanation:

i took the test on platos and got it right

7 0
3 years ago
Write a C program to compute the average age of nth student
Hitman42 [59]

Answer:

Following are the code in c language

#include <stdio.h> // header file  

int main() // main function

{

 int n1,i;

 float avg,x,s=0; // variable declaration

printf("\nEnter How many Number terms you want:");

 scanf("%d",&n1); // input terms by user

 for(i=0;i<n1;++i)

{

 scanf("%f",&x); // user input

s= s +x; //calculate sum

}

avg = s/n1;// calculate average of n number

printf("\nThe average of n number is:");

 printf("%f",avg); // display average

return 0;

}

Output

Enter How many Number terms you want:3

3

4

3

The average of n number is:3.333333

3 0
3 years ago
Other questions:
  • If the boolean expression a is true and b is false, the value of the logical expression a or b is ________.
    14·1 answer
  • The instructions for the OS provided by application software
    14·2 answers
  • What can be done to improve the security of business uses of the Internet? Give several examples of ecurity measures and technol
    9·1 answer
  • On an unweighted scale, a grade of A is worth _____ points
    7·1 answer
  • Although “dog.jpg” and “dog.JPG” and “Dog.jpg” and “DOG.JPG” all appear to be the same file, they are not considered the same wh
    6·1 answer
  • The number of colors in a bitmap image determines which category the image will be in. Complete the following sentences.
    15·1 answer
  • Need help with these
    8·1 answer
  • Which types of files are saved with the .mp3 and .zip extensions?
    12·2 answers
  • Explain why the scenario below fails to meet the definition of a stakeholder.
    5·1 answer
  • Who is better, Tom, Ben, Hank, Angela, or Ginger
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!