Question: PYTHON: Write a program that reads an unspecified number of integers from the user, determines how many positive and negative values have been read, and

PYTHON: Write a program that reads an unspecified number of integers from the user, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting zeros). The program ends with the input 0. The average is displayed as a float with 1 digit to the right of the decimal point. If the user enters a 0 as the first integer display the following message: No numbers were entered except 0. PYTHON: Write a program that reads an unspecified number of integers

When prompting the user you must always include text which lets the user know what should be inputted. Write a program that reads an unspecified number of integers from the user, determines how many positive and negative values have been read, and computes the total and average of the input values (not counting zeros). The program ends with the input 0. The average is displayed as a float with 1 digit to the right of the decimal point. If the user enters a 0 as the first integer display the following message: No numbers were entered except 0. Example program runs: Enter an integer, the input ends if it is 0: 5 Enter an integer, the input ends if it is 0: 18 Enter an integer, the input ends if it is 0: -6 Enter an integer, the input ends if it is 0: -4 Enter an integer, the input ends if it is 0 : 3 Enter an integer, the input ends if it is 0: -8 Enter an integer, the input ends if it is 0: 12 Enter an integer, the input ends if it is 0 : 0 The number of positive integers is: 4 The number of negative integers is: 3 The total is: 20 The average is: 2.9 ============ RESTART: C:/CIS150/Python/Chapter 5. Enter an integer, the input ends if it is 0:0 No numbers were entered except 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!