Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python, have your program do the following, using loops (no recursion) 1. Have the user repeatedly enter integers until they enter a negative number.

Using Python, have your program do the following, using loops (no recursion)

1. Have the user repeatedly enter integers until they enter a negative number. At that point stop inputting and proceed to the output described in step two. Note: The negative number that terminates the input is not included in any of these results.

2. When the input is done, display the following if there was at least one valid (non -negative) number entered:

a. The sum of the numbers entered in that loop

b. How many numbers were entered

c. The average of those numbers to two places (avoid integer division.)

d. The lowest number input

e. The highest number input

If there were no (valid) numbers entered, make sure your code displays the message no valid numbers entered (and avoids dividing by 0) instead of displaying a - e below.

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

Students also viewed these Databases questions

Question

Find the derivative. f(x) 8 3 4 mix X O 4 x32 4 x32 3 -4x - x2

Answered: 1 week ago