Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use python only Write a program that will read a series of numbers from the user and maintain an average of the positive numbers entered.

image text in transcribed

use python only

Write a program that will read a series of numbers from the user and maintain an average of the positive numbers entered. If the user enters a number that is not positive, then the program will immediately exit and display the average. Notes: - Input could be an integer or floating point value, so you should use float() to convert the input into a number. - If no positive numbers are entered, the program should display "Average: undefined". - The average should be rounded to 2 dp when displayed. - The output must be in the format shown in the examples below, including the format of the prompt, spaces, and punctuation. For example

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

More Books

Students also viewed these Databases questions

Question

a. Compute = E(Y).

Answered: 1 week ago