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

  Calculate the heat transfer per unit mass of water

A 110-volt electrical heater is used to warm 0.3 m3 /s of air at 100 kPa and 15°C to 100 kPa and 30°C. How much current in amperes must be supplied to this heater?

  Write and test a program that reads in three integers

write and test a program that reads in three integers and prints out the sum of the largest two of the three. Use the SPIM system calls described on pages B-43 and B-45. You can break ties arbitrarily.

  Names and majors of students

Print the names and majors of students who are taking one of the College Geometry courses. (Hint: You'll need to use the "like" predicate and the string matching character in your query.)

  What is triple encryption

What is triple encryption? Why is the middle portion of 3DES a decryption rather than an encryption?

  Layouts and access

Envision that you have been asked to create a Website for a bookstore that sells e-Books. Taking into consideration how customers might log in to shop, determine the type of layout you would use. Explain how you came to this decision.

  Write code that repeatedly asks the user to enter a word

Write code that repeatedly asks the user to enter a word.

  Understanding of computer hardware

The purpose of this assignment is for you to test your understanding of computer hardware, compatible architecture, and system requirements. You will design your own computer by selecting parts from the website NewEgg.com. You will be given a budget ..

  Compute an analysis of variance table for these data

Compute an analysis of variance table for these data and test the null hypothesis that all four treatments yield the same average moisture contents.

  Show the binary results for operations

Show the binary results for the subsequent operations using a 5-bit word - 2's complement arithmetic (8-16) and (12-13);

  Show that if strings over an alphabet are encoded

Show that if strings over an alphabet A with at least two letters are encoded over a one-letter alphabet (a unary encoding), then strings of length n over A require strings of length exponential in n in the unary encoding.

  Small computer program that is typically installed

Malware is defined as a small computer program that is typically installed without the knowledge of the end user. It is designed to spy, annoy, or cause other harms to the user.

  Will ibms plan to give away some of its it assets

Will IBM's plan to give away some of its IT assets and intellectual property and increase support of opensource software products like linux ,be a successful growth strategy in the "brutally competitive marketplace" in which it operates?why OR WHY..

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