Question: We will write a program that asks the user to input a series of expenses, and -1 when they are done ( we will use
- We will write a program that asks the user to input a series of expenses, and -1 when they are done (we will use a while loop here)
- The program adds each expense to a list as it comes in from the user
- After they are done entering expenses, the program uses a second loop, this time a for loop, to go through the list and adds together any expenses that over $100
- After the loop is done, the program prints the sum of expenses over $100
First, before writing the code, what is the high level algorithm?
(remember to use a while loop for the first part and a for loop for the list traversal)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
