Question: Write a python program with a loop that asks the user to enter a series of positive numbers. The user should enter a negative number
Write a python program with a loop that asks the user to enter a series of positive numbers. The user should enter a negative number to signal the end of the series. After all the positive numbers have been entered, the program should display their sum.
Input:
Expected output:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Enter a positive number negative to quit:
Total
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
