Question: Write a program where the user enters name, hourly pay rate and hours worked for four weeks followed by monthly expenses for rent, utilities,

Write a program where the user enters name, hourly pay rate and hours worked for four weeks followed by

Write a program where the user enters name, hourly pay rate and hours worked for four weeks followed by monthly expenses for rent, utilities, transportation, and food. There is a fixed monthly car payment of $357.75 which should be represented as a named constant. Total income is the sum of hours worked times the hourly rate. Total expenses is the sum of all monthly expenses. Produce a neat chart using F-strings as shown of expenses followed by total income, total expense, and amount leftover. Code should work for any valid data. Formatting: The first column is 20 spaces and remaining columns use 15 spaces Columns are left aligned Floating point numbers use 2 decimals Sample Output: Enter your name: Carol Enter hourly pay rate: 25.75 Enter hours worked for week 1: 40 Enter hours worked for week 2: 32 Enter hours worked for week 3: 24 Enter hours worked for week 4: 28 Enter rent: 800.00 Enter utilities: 350.75 Enter transportation: 130.00 Enter food: 325.50 Budget Report for Carol Item Car Rent Utilities Transportation Food Total Income Total Expense Leftover Amount ($) 357.75 800.00 350.75 130.00 325.50 3193.00 1964.00 1229.00 Add comments as follows: At the top of the program list your name and a brief description of the problem. The named constant should be commented as so their purpose for the reader. Major blocks of code and computations should be commented so the reader can follow the logic. A non-programmer should be able to understand the code by reading the comments.

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!