Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 10 Not yet answered The following program reads three positive integer numbers: x, y, and z entered by the user. It checks whether or

image text in transcribed

Question 10 Not yet answered The following program reads three positive integer numbers: x, y, and z entered by the user. It checks whether or not all the numbers are positive. Then, it calculates and prints the total and the average of the square of the input numbers. The result should be printed with 2 decimal points. If at least one of the input numbers is not positive, the program prints an error message. Complete the missing parts of the following code by drag and drop the appropriate statements shown below. Marked out of 1.00 Flag question total = ***2 + y2 + 2*2 print("total = %.2f average = %.2f" %(total, average)) if (x>0 or y>0 or z>0); X, Y, Z = (int(x), intly), int(z)) if (x>0 and y>0 and z>0); print ("Numbers are not positive") total = x2 + y2 + 2*2 xy.z= (input("Enter three integer numbers:")) split else print("total = %2d average = %2d"%[total average) average = total/3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

1. Explain why evaluation is important.

Answered: 1 week ago