Question: HERE IS WHAT I WANT YOU TO DO: Write a well - commented Python program in a Jupyter Notebook file that gathers budgetary input from

HERE IS WHAT I WANT YOU TO DO:
Write a well-commented Python program in a Jupyter Notebook file that gathers budgetary input from
a user, stores it in a list, and reports how expenses compare to the budget amount.
This assignment is not about the answer. It is about the process that gets you to the answer. You are
not allowed to use any shortcut functions.
HERE IS WHY I WANT YOU TO DO IT:
In addition to the skills we have practiced to this point, this assignment will give you more experience
with the following concepts:
using input()
using IF statements
using FOR and/or WHILE loops
creating and using lists
HERE IS HOW TO DO IT:
1. Have the user enter the total budget amount.
2. The user should then enter individual integer expense amounts. Use a loop to continue to ask
the user for another amount. There are three general approaches you can use for the loop.
Choose the one you prefer. The approaches are:
a. Use a sentinel variable and a Continue? prompt. (Be sure to treat Y and y as the
same entry.)
b. Ask for the number of entries up front.
c. Loop until a specific value (like a negative number) is entered.
3. Expense values are stored in a list as they are entered.
4. When entry is complete, use a loop to total the amounts in the list (NO SHORTCUTS).
5. Compare the total expenses to the budget amount.
6. Report the over or under budget status to the screen. Use the abs() function in Python to get the
absolute value of the difference for display and report the text over budget,on budget, or
under budget with the difference.
The next page of this document contains examples of possible input and output using each of the three
looping approaches. Use the data shown in the examples to test your program. All looping techniques
will calculate the same result if done correctly.
HERE IS WHAT NOT TO WORRY ABOUT:
1. Formatting the numbers the way they look in the examples. You can do it if you want, but it is
not required. If you decide to add that, make sure the rest of your code works first.
2. Removing the zero amount from the output when on budget (see Example 3).
3. Write your code in one cell or do it in multiple cells. Whichever way works best for you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!