Calculate gross pay for an employee and display

Assignment Help Programming Languages
Reference no: EM131137682

A local small business has hired you to write a 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. For this project:

- You will submit your python code in either the original .py file, or copied into a .txt file.

A screenshot of your code having been executed (run).

How to Take a Screenshot Tips: Remember to keep track of input data types when comparing values. input() formats the user's data as a string, so comparing string data to a number without quotes would produce an error.

Do not worry about security, it is irrelevant here. Just focus on the functionality discussed above. 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: EM131137682

Questions Cloud

What is motivation and how does it affect your behavior : What is motivation and how does it affect your behavior? How does understanding Positive Organizational Behavior benefit you? How can you build and repair trust in ways that make you more effective at school, work, and home?
Derive an equation for the excess pore water pressure : The excess pore water pressure at the top boundary is not zero because the sand layer was partially blocked. Derive an equation for the excess pore water pressure distribution with soil thickness and time.
The null and alternative hypotheses for this test : Test at the 0.05 level of significance whether the mean of a random sample of size n = 16 is "significantly less than 10" if the distribution from which the sample was taken is normal, = 8.4, and σ = 3.2. What are the null and alternative hypoth..
Why environmental health is an individual concern : This paper should demonstrate your understanding of the following the term environmental health. Why environmental health is an individual concern. Why environmental health is a global concern.
Calculate gross pay for an employee and display : 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.
Established for a reading comprehension test : According to the norms established for a reading comprehension test, eighth graders should average 84.3 with a standard deviation of 8.6. If 45 randomly selected eighth graders from a certain school district averaged 87.8, use the four steps in th..
Why is the real interest rate uncertain : What is the one-year expected and actual real interest rate on the indexed bond?- Why is the real interest rate uncertain but the nominal interest rate known in this case?
Write the code to complete lines : Provide the application that helps users to calculate the area - what is static members in data type class and how to write static methods
Brandon is the marketing manager for local fitness center : Brandon is the marketing manager for a local fitness center. All of the following are good ways to build awareness and engage people with the fitness center to achieve communication objectives except A. social media B. sales promotions C. advertising..

Reviews

Write a Review

Programming Languages Questions & Answers

  Application that calculates the cost of all the supplies

Write an application that calculates the cost of all the supplies added to the user's shopping list (Fig. 22.18). The application should contain two Li stBoxes. The first contains all the supplies offered and their respective prices. Users should ..

  Create a program that demonstrates the core algorithms

Create a program that demonstrates the core algorithms that will prototype the general operation of the application.

  Create an xml file with markup tags

Create an XML file with markup tags and some sample data to represent a list of invoices. Include the XML tags for two invoices in the list.

  Program to find real and complex roots of quadratic equation

Write a VBA program to find the real and complex roots of the quadratic equation.

  Write pseudocode to calculate the total price of the items

Create a line on the output receipt that identifies the item its price and the sales tax applicable to that item. Keep a running total of item prices and taxes.

  Function named quadratic that receives three parameters

Write the definition of a function named quadratic that receives three double parameters a , b , c . If the value of a is 0 then the function prints the message "no solution for a=0" and returns.

  Implement the calculator using stacks and queues

You will implement the calculator using stacks and queues. Your calculator should support following operators: Parenthesis. The input will be given in form of infix expressions, e.g. ( 2 + 3 ) * 5.

  Identify a list of function/menus that need to be test

The task is to use Equivalence Class partitioning and Boundary Value Analysis (which means to test the input at the boundary of the equivalence class partition) to analyze the valid and invalid inputs for Microsoft WinWord or any other software pa..

  Create a credit approval application for retail store

You have been asked to create a credit approval application for retail store. To get approved for credit card customer must meet the following criteria: Should be 18 years of age or older

  Calculate the amount of profit and loss

Calculate the amount of profit and loss. Also if Profit then display the smiley face, if loss then display sad face and if break even then confused face.

  Solution-p1mygrade

a) Name this Solution "p1MyGrade" and this project "MyGrade01". b) Write a simple program that does the following:

  Write class postfixevaluator to evaluate postfix expression

Write a class PostFixEvaluator that evaluates postfix expression such as 6 2 + 5 * 8 4 / -. Program must read a postfix expression consisting of digits and operators into a StringBuffer.

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