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]
2 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]2 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
Definition of powerpoint animation
saul85 [17]

Answer:

An powerpoint animation is an animation that uses powerpoint or another similar app like google slides to create a video, game, or movie.

but...

If you mean just in Microsoft Office it's a visual or sound effect that you can add to slides to make them more interesting.

Explanation:

3 0
2 years ago
Endnotes into a document are automatically positioned at the bottom of the page where the endnote reference is inserted.
dezoksy [38]
I think false hope its right
3 0
3 years ago
You told your sister about creating bullet points with Word 2013. She calls you and says that she created a list of six bullet p
lapo4ka [179]

Answer:

Tell her to hold the Shift key as she hits Enter.

8 0
3 years ago
The PowerPoint view in which you can edit the slide master is called ______________.
nirvana33 [79]

Answer:

it's slide master view.

8 0
2 years ago
An individualized course plan for the 4 years of
spin [16.1K]

Answer:

.....

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • PLEASE HELP!
    13·2 answers
  • Ports on the motherboard can be disabled or enabled in ____ setup. RAM Firmware Northbridge BIOS
    8·1 answer
  • This type of technology does not come with a keyboard or mouse for input
    11·2 answers
  • The icons to insert footnotes and endnotes in a document are located in the _____ tab.
    8·1 answer
  • A character with the point size of 10 is about 10/72 of once inch in height
    8·1 answer
  • List at least 5 features that can be used to format a report in word 2013
    6·1 answer
  • Which of the following best explains what happens when a new device is connected to the Internet?
    9·1 answer
  • What is output?<br> x = 2<br> y = 3<br> print (x * y + 2)<br> 4<br> 2<br> 8<br> 10
    7·1 answer
  • PLEASE HELP!
    12·1 answer
  • Structured query language (sql) enables data analysts to _____ the information in a database.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!