subject
Engineering, 18.02.2020 00:31 izzyisawesome5232

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.

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, skpdancer1605
Ariver flows from north to south at 8 km/h. a boat is to cross this river from west to east at a speed of 20 km/h (speed of the boat with respect to the earth/ground). at what angle (in degrees) must the boat be pointed upstream such that it will proceed directly across the river (hint: find the speed of the boat with respect to water/river)? a 288 b. 21.8 c. 326 d. 30.2
Answers: 3
image
Engineering, 04.07.2019 18:10, Larkinlover703
Items are similar to the free issue items, but their access is limited. (clo5) a)-bin stock items free issue b)-bin stock controlled issue c)-critical or insurance spares d)-rebuildable spares e)-consumables
Answers: 1
image
Engineering, 04.07.2019 18:20, moneywaydaedae
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
Answers: 1
image
Engineering, 04.07.2019 18:20, luisgonz5050
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
You know the right answer?
Using Python, have your program do the following, using loops (no recursion)

1. Have the...

Questions in other subjects:

Konu
Social Studies, 01.01.2022 08:20
Konu
Computers and Technology, 01.01.2022 08:20