Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started