Focus on the functionality discussed above

Assignment Help Basic Computer Science
Reference no: EM131432618

Payroll

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: EM131432618

Questions Cloud

Internet recruiting and a job posting : Create a 10-12 slide presentation that includes your findings about Internet recruiting and a job posting for a sales representative position.
Write the four parts for a two sided hypothesis test : Write the four parts for a two-sided hypothesis test concerning the population mean with a = 0.002.- Suppose x‾ = 9.04 and σ = 1.20. Find the value of the test statistic, and draw a conclusion about the population mean.
What makes an effective team member : In this assignment, students should use leadership theory, the course textbook, articles, as well as their own experience to address the questions. The paper should blend reflection with analysis and integrate "academic" ideas with research. Make..
Write a hypothesis for what you expect to observe : Identify the key variables you are going to be investigating, and develop an operational definition for each of them. (this should include at least two variables, but not more than four). Your operational definitions will help to provide paramete..
Focus on the functionality discussed above : 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. Ju..
Describing functions of the chosen case tools : Choose one or more CASE tools that support system process definition. Write a short essay describing functions of the chosen CASE tools with advantages and disadvantages of each function
Write a solution trail for given problem : Conduct a hypothesis test to determine whether there is any evidence that the mean weight of Atlantic bluefin tuna is less than 550 pounds.
Material flow system : Type a one-page summary over Section 3.3: Material Flow System (pg. 88-97) and include at least one example of a flow path different than any example in the book (you can make up your own process or data for this example)
Newsstand database in kaplan library : Write two well-written paragraphs (about 250 words total) regarding the article you select. The first paragraph will summarize the important points of the article in a way that brings clarity and learning to all who read it. The second paragraph w..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Smartphones and the great digital divide

we present some data regarding smartphone adoption and usage by ethnicity, gender, income, and education. It's very interesting to see how different groups use smartphones in different ways.

  What are the roles of an organizations

What are the roles of an organizations IT, security, and general management with regard to physical security?

  Questions and requirements to write your paper

Please answer the following questions and requirements to write your paper of 4-5 pages. As you answer each question, you must provide support or evidence that will enhance and empirically prove your answers. Academic information technology (IT) a..

  How does the pregnancy experience affect motherhood

How does the transition into motherhood shape the everyday experiences of the self-reported depressed Nigerian adolescent and adult women?

  Program to display a message telling the user why

The password should have at least one digit. Write a program that asks for a password and then verifies that it meets the stated criteria. If it doesn't, the program should display a message telling the user why.

  Use of business intelligence

Identify 2 specific benefits that the organization receives from its use of business intelligence (BI). Contrast the value of these benefits against the costs of the organization's BI initiatives.

  Create an arraylist of type string and prompt

a) Create an Arraylist of type String and prompt the user for three names and add these names to your ArrayList. b) Print a message with the number of elements in the ArrayList for the user using the size() method (to find the number to print.)

  What is the cidr for the blocks in the first

Find the interface identifier if the physical address of the EUI is (F5-A9-23- AA-07-14-7A-23)16 using the format we defined for Ethernet addresses.

  Label the least and most significant bit

produce a truth table showing what the next state of the machine should be as a function of the current state. then produce a combinational circuit using gates and D-flipflops that implements this state machine. label the least and most significan..

  Excels multiple worksheet abilities

Question 1. Excel's multiple worksheet abilities can do all of the following EXCEPT: (a) create Pivot Charts. (b) group worksheets together to enter data. (c) display worksheets side by side. (d) IN create links among the worksheets.

  How you will ensure the security of your valuable data

This laptop is always with you at home, at school, and at work. Describe how you will ensure the security of your valuable data.

  Companies turning to smart electric meters

Why are South American electric companies turning to smart electric meters? (Refer to IT's About Business - Brazil uses smart meters.)

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