Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(I would like to know this as fast as possible please) How would the code and test case look for this python program i already

(I would like to know this as fast as possible please) How would the code and test case look for this python program i already done the algorithm and have it listed below the question image text in transcribed
Write a Python program that allows the user to enter any number of non-negative floating-point values. The user terminates the input list with any negative value. The program then prints the sum, average (arithmetic mean), maximum, and minimum of the values entered. Algorithm: Get all positive numbers from the user Terminate the list of numbers when user enters a negative Calculate the sum by adding all numbers together, store in variable sum_num Count how many positive numbers are entered using variable count Calculate the average by dividing sum_num by count Print sum_num and avg_num

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_2

Step: 3

blur-text-image_3

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

=+7. What is the big message you want them to know? (THINK SLOGAN.)

Answered: 1 week ago

Question

What is digital literacy? Why is it necessary?

Answered: 1 week ago