Question: I need some help making some program code. Objectives: Practice getting input from the user Converting input when appropriate Use input in simple math equations
I need some help making some program code.



Objectives: Practice getting input from the user Converting input when appropriate Use input in simple math equations Format numbers and strings Use conditional statements Assignment: Your job is to create a program that tells the user whether they have been below, on, or over budget given their monthly income and savings goal. To do this, your program should ask the user how much they're making in a month and how much they would like to save. The program should then calculate the budget -- how much of their monthly salary can they spend and still meet their savings goal. Next, the program should give a series of at least four expenses that are paid in a month (my example has rent, utilities, food, and miscellaneous) asking the user how much they spent on each category. Once you've finished gathering expenses, compute how much they spent that month and, through a series of conditions, tell the user whether they were under, on, or over budget. On budget can be +5 the determined budget (so, a $1000 budget could have between $995-$1005 and still be on budget). If the user went over budget (so more than $5 over the determined budget), tell them how much they went over budget. A sample execution of the lab is attached on the following page. Note: Make sure your prices are format neatly. Sample Execution: (Under budget example) Hello! Welcome to your budget buddy. We take in how much you make versus how much you spend and tell you whether you achieved a saving goal. How much do you make in a month? 4536.18 How much do you want to save in a month? 2500 You budget is $2036.18 for the month. Now we'll see how much you spent this month. How much did you spend on rent? 914.23 How much did you spend on utilities? 130 How much did you spend on food? 435.98 How much did you spend on other miscellaneous purchases? 546.12 Calculating... You spent $2026.33 total this month. You came in under budget! (Over budget example) Hello! Welcome to your budget buddy. We take in how much you make versus how much you spend and tell you whether you achieved a saving goal. How much do you make in a month? 2000 How much do you want to save in a month? 1000 You budget is $1000.00 for the month. Now we'll see how much you spent this month. How much did you spend on rent? 900 How much did you spend on utilities? 100 How much did you spend on food? 435.97 How much did you spend on other miscellaneous purchases? 124.73 Calculating... You spent $1560.70 total this month. You went over budget by $560.70
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
