Guidelines of good program design

Assignment Help Basic Computer Science
Reference no: EM131893449

Payroll

A local small business has hired you to write the payroll calculation program. The program only needs to calculate gross pay for an employee and display the results. Your program will accept the employee's name, hours worked, and the employee's pay rate. The program will need to calculate overtime as well. Overtime is defined as anything over 40 hours is paid at 1.5 times the regular pay. The program should print the employee's name, the gross pay amount, and only if there was overtime, print the overtime pay amount as well. Finally, the program should repeat as necessary until the user enters a sentinel value.

Remember to follow the guidelines of good program design. Make sure to use meaningful variable names, include comments as needed, and provide thoughtful output.

Example output:

C:>python week2.py

ABC Inc., Gross Pay Calculator!

Enter employee's name or 0 to quit: Nathan

Enter hours worked: 35

Enter employee's pay rate: 10.00

Employee Name: Nathan

Gross Pay: 350.0

Enter next employee's name or 0 to quit: Toby

Enter hours worked: 45

Enter employee's pay rate: 10

Employee Name: Toby

Gross Pay: 475.0

(overtime pay: 75.0 )

Enter next employee's name or 0 to quit: 0

Exiting program...

Reference no: EM131893449

Questions Cloud

What would your ideal job look like : Discussion-Your Ideal Job. In a perfect world, what would your ideal job look like? Have you engaged in any planning to achieve this ideal
Explain how would improve the current situation : Discuss your viewpoints on the question of whether patients can adequately understand and judge the quality of the health care services they receive.
Crisps uses discount rate for all NPV analysis : Crisps has received an order for 14500 bags of potato chips from BigBag. Crisps uses a discount rate of 6.45% for all NPV analysis.
Problems associated with a reactive risk strategy : Provide five examples from other fields that illustrate the problems associated with a reactive risk strategy.
Guidelines of good program design : Remember to follow the guidelines of good program design. Make sure to use meaningful variable names, include comments as needed
Identical size operating in identical markets : Two identical firms of identical size operating in identical markets. Calculate the level of EBIT that would make earnings per share the same for Ski and Board.
Enter the number of shirts being laundered : The interface provides a text box for the user to enter the number of shirts being laundered. You want to make sure a string typed
Compare the competing visions of health care administration : Write a paper of 1,000-1,200 words that compares and contrasts the competing visions of health care administration among stakeholders.
Discuss the biggest threats to a company : Can someone help me discuss the biggest threats to a company's information security and how do I propose that IT protects against those threats.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd