Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Please! I have a MU editor, so hopefully it is compatible. Thanks In this PA, you will be writing a program that helps a
Python Please! I have a MU editor, so hopefully it is compatible. Thanks
In this PA, you will be writing a program that helps a user visualize and understand how much money they spend of various categories of expenditures. Perhaps you will even find this program useful for your personal finances! You should name your program wheres_the_money.py. The program interface This program works by accepting a number of various inputs from a user about how much they make, and how much they spend. The program will accept 5 input values. After printing out a welcome message, the program will request all 6 of these inputs. Below is an example of these input requests, with values provided: WHERE'S THE MONEY What is your annual salary? 50000 How much is your monthly mortgage or rent? 1000 What do you spend on bills monthly? What are your weekly grocery/food expenses? 200 How much do you spend on travel annually? 2500 400 These 5 values will be used to generate a visualization of the financial situation that looks like so: See the financial breakdown below, based on a salary of $50000 * | mortgage/rent 1 $ 12,000.00 24.0% ## bills | $ 4,800.00 9.6%# ### food I $ 10,400.00 20.8% #1 travel | $ 2,500.00 5.0%#***# tax | $ 10,000.00 | 20.0% | #### extra I $ 10,300.00 20.6% As you can see, the result is essentially a 6-row, 4-column grid that neatly shows that amounts and percentages of income go where. Each row represents an expense (or other category) where money goes to on a yearly basis. The first columns provides the name of the category. The second column shows the amount of money that goes to this category in dollars. The third columns shows the amount of money as a percentage of yearly income. The last column is a horizontal bard that correlates with the percentage of income. The number of characters in this column should be the same as the percentage of income (rounded down). Calculating the values The output provided above shows the kind of output this program should produce. Let's talk a bit about how to compute these values. The basis for all of the percentages is the first input value - the annual income. All of the percentages are calculated based on this. The next two inputs, rent and bills, are monthly expense values. In order to get the total spend on these categories annually, these numbers must be multiplied by the number of months in a year. Then, you can use this result to calculate the percentage. The fourth value is a weekly expense, so this must instead be multiplied by the number of weeks in a year. The fifth value is already input as an annual value, so you don't need to multiple by number of weeks or months. The tax percentage is dependent upon the amount of money a person make annually. The tax brackets are as follows: [$0, $15k] annually: 10% tax ($15k, $75k] annually: 20% tax ($75k, $200k] annually: 25% tax over $200k annually: 30% tax You should use one or more if / elif / else statements in the code to determine which tax percentage to use. You can store the tax percentage as an integer variable, with one of the following values: 10, 20, 25, or 30. You can compute the amount of the salary goes to taxes as a particular percentage with this formula: annual_salary (tax_percentage / 190.6) After calculating all of these values programmatically, you should generate the output table. There is also a tax limit of $75,000. The tax should be capped at this value, and if the limit is reached, a message indicating this should be printed out after the chart. The message should say: >>> TAX LIMIT REACHED >> WARNING: DEFICITStep 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