Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TO BE CODED IN PYTHON WITH COMPLIANCE TO THE WHILE LOOP METHOD!! 1) Design your own program that will: a. Ask the user for a

TO BE CODED IN PYTHON WITH COMPLIANCE TO THE WHILE LOOP METHOD!!

1) Design your own program that will:

a. Ask the user for a number.

b. If the number is positive, the program will add that number to a running total.

c. If the number is negative, the program will state that the values must be positive and will NOT add the value to the total.

d. After any number is entered, the program will display the running total so far and then ask the user for another number to add to the total.

e. This process will continue until the user enters in a value of 999. f. If the user enters in 999, then the loop will end.

g. After all numbers have been entered and the user enters in 999, the program will display the following:

i. The total value of all positive numbers entered.

ii. How many values have been added to the total.

iii. The average value of all the numbers added to the total.

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

=+7 How has the COVID-19 pandemic impacted the operations of IHRM?

Answered: 1 week ago