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

  Implications of answer for the entrepreneur

Do you believe that the laws should be changed to make it easier for entrepreneurs to go into, and recover from, bankruptcy? What are the implications of your answer for the entrepreneur, creditors, and the national economy?

  Summary of how the values are stored

Explain how to declare and assign values to a two-dimensional array and provide a C++ program segment that illustrates your answer. Provide a summary of how the values are stored.

  Analyze hardware virtualization

Determine if you would prefer a virtualized environment to a non-virtualized environment for a midsized business or organization and explain why or why not. Compare the cloud computing cost models used by Amazon EC2 and Microsoft Azure.

  Write code to de-vowel an input string

Write code to "de-vowel" an input string. Assume that the user provides input containing only the characters a through z (and all lowercase). Your code should create an output string that deletes all vowels from the input string, pushing the lette..

  Show if G does not have a self-embedding non-terminal

Show that, if G does not have a self-embedding non-terminal, then it is regular.

  Uniqueness and the existence of data

With these thoughts in mind, analyze ways to ensure uniqueness and the existence of data. Consider the attributes you will store, and discuss each of the following:

  Research the tcp protocol and choose one tcp

TCP is a reliable transport protocol. Research the TCP protocol and choose one TCP topic and write a tutorial, detailed instructions on the use of an IP related topic .  If the topic you have chosen has already been discussed in CSEC640 Module1, enha..

  Draw supply and demand curves on accompanying graph

Use the following data to draw supply and demand curves on the accompanying graph.

  What kind of evidence is provided and how good is it

What are the value and descriptive assumptions

  Bottle of french champagne

After a great deal of experimentation, two college senior physics majors determined that when a bottle of French champagne is shaken several times, held upright, and uncorked, its cork travels according to the function below, where s is its height..

  A graph is two-connected iff

A graph is two-connected iff, removal of any single vertex and the edges adjacent to that vertex, leaves the graph connected. How can we tell if a graph is two-connected? Explain your algorithm in English

  How many degrees of freedom would it take

Should he consider fitting an interaction term to the model? Why or why not? How many degrees of freedom would it take?

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