Write a program where the user enters name, hourly pay rate and hours worked for four...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young
Posted Date:
Students also viewed these programming questions
-
You write one New York Inc. June 120 call option contract for a premium of $5.68. You hold the position until the expiration date when New York Inc. stock sells for $126.56 per share. Calculate...
-
Read the following question carefully, and answer what the question is asking for: "What", "When", "Why", "How Many" and provide examples where required. Sunrise Distributors recently completed a...
-
The Sports Equipment Division of Harrington Company is operated as a profit center. Sales for the division were budgeted for 2014 at $903,810. The only variable costs budgeted for the division were...
-
In 2014, Elbert Corporation had net cash provided by operating activities of $531,000; net cash used by investing activities of $963,000; and net cash provided by financing activities of $585,000. At...
-
What is a meant by an efficient secondary market? How is its efficiency measured?
-
Consider the following extended Keynesian model of income determination: Where C = consumption expenditure Y = income I = investment T = taxes G = government expenditure us = the disturbance terms In...
-
Define slip in a reciprocating pump.
-
What is revaluation of plant assets? When should revaluation be applied?
-
A nursing team is having a routine meeting. One of the nurses, Stephen, is at the end of a 12-hour shift, and another nurse, Tanya, is just beginning hers. Tanya is a senior nurse in the unit with...
-
The bar codes above represent locations in a warehouse. How many units would be left in each location? If you picked 250 units from location 00000113774360000 If you picked 250 units from location 00...
-
Problem 2: [20 pts] (Floyd-Warshall algorithm) Let G = (V, E) be the directed weighted graph shown below with its asso- ciated weighted adjacency matrix. Solve the all-pairs shortest-path problem on...
-
Under what conditions are courts unlikely to enforce a release in which the plaintiff expressly assumes the risk?
-
What does the collateral-source rule prevent defense attorneys from doing? 1. What is the rationale for this rule? 2. What is subrogation, and how does it relate to this rule?
-
How does assumption of risk compare to contributory negligence?
-
Punitive damages are in essence criminal fines that arguably should be paid to the state. True False
-
What is a coordination-of-benefits provision?
-
1. Which of the following employees is most likely to be ahub? A) Before his next project starts, Joseph wants his boss toexplain the rewards for a good job. B)Lila values efficiency and precision in...
-
What are the 5 Cs of marketing channel structure?
-
Discuss the possible effect on human behavior of a preoccupation with variances in financial control.
-
What is benchmarking, and why is it used?
-
The Gonzalez Company uses a job order costing system at its plant in Green Bay, Wisconsin. The plant has a machining department and a finishing department. The company uses two cost driver rates for...
-
Birth weights in the United States are normally distributed with a mean (in grams) of 3420 g and a standard deviation of 495 g. If you graph this normal distribution, the area to the right of 4000 g...
-
Is the distribution of those digits a normal distribution? Why or why not?
-
Many states have lotteries that involve the random selection of digits 0, 1, 2, ,
Study smarter with the SolutionInn App