file as: Write a program to compute the pay of Employees. The data is to be...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
file as: Write a program to compute the pay of Employees. The data is to be read from a first name, last name, employee id, hours worked and pay rate employees.txt-Notepad Eile Edit Format View Help Adam, Ames, 111452,45,17.50 Sally, Sims, 111657, 35, 22.75 Mark, Manning, 111932, 52, 16.50 Cindy, Carson, 1117,48,18.50 Jim, Jacobs, 111873, 30,25 Alice, Andrews, 11262, 60, 19.50 You will write a function called compute_pay that will compute the pay of the employee. The pay is to be computed as hours worked multiplied by the pay rate if the number of hours worked is less than 40. If the number of hours worked is greater than 40, then the pay has to be 1.75* pay_rate hours_worked. The computed pay is to be stored in an output file as: Id last name pay file as: Write a program to compute the pay of Employees. The data is to be read from a first name, last name, employee id, hours worked and pay rate employees.txt-Notepad Eile Edit Format View Help Adam, Ames, 111452,45,17.50 Sally, Sims, 111657, 35, 22.75 Mark, Manning, 111932, 52, 16.50 Cindy, Carson, 1117,48,18.50 Jim, Jacobs, 111873, 30,25 Alice, Andrews, 11262, 60, 19.50 You will write a function called compute_pay that will compute the pay of the employee. The pay is to be computed as hours worked multiplied by the pay rate if the number of hours worked is less than 40. If the number of hours worked is greater than 40, then the pay has to be 1.75* pay_rate hours_worked. The computed pay is to be stored in an output file as: Id last name pay
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Find all points on the curve In (xy) = x where the tangent lines are vertical.
-
Write a program to compute the grades of students. The test scores are to be read from a te te that the data cont fi The weight of the first test is 30%, the weight for second test is 30%, and the...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The roller coaster in Figure P6.36 starts with a velocity of 15 m/s. One of the riders is a small girl of mass 30 kg. Find her apparent weight when the roller coaster is at locations B and C. At...
-
On November 1, 2015, Fresh Manufacturers Inc. bought a line of production machinery for its new office for $500,000. (Machines fall within class 38-CCA rate 30%.) The residual value of the machinery...
-
Of what value is the Gantt chart to the project manager? The PERT chart?
-
What is the structure of a UC Description? What is the optimal length of a UC Description? Paragraph? Pages?
-
Three gram-moles of benzene and 7 gram-moles of toluene are placed in a closed cylinder equipped with a piston. The cylinder is immersed in a boiling-water bath that maintains the temperature at...
-
Sam, married filing separately without dependents, has $ 3 2 5 , 0 0 0 salary and $ 7 5 , 0 0 0 qualified dividends. Her taxable income is $ 3 8 0 , 0 0 0 . Compute Sam's total tax liability for the...
-
Apple is considering a replacement machine that has a cost of $25,000.The new machine will permit output expansion, so annual revenues are estimated at $5,000 during its operating period.The new...
-
Draw Alfonsos budget line in a contingent consumption (CC) diagram. (b) Suppose Alfonso is risk averse with utility-of-money function v (c) = ln (c). Suppose further that Alfonso has probability 1 4...
-
An investor has a three-stock portfolio with $25,000 invested in Apple, $50,000 invested in Ford, and $25,000 invested in Walmart. Apples beta is estimated to be 1.20, Fords beta is estimated to be...
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. Contracts for personal services may not be assigned unless there is agreement to the...
-
8.2-4. Consider the system of Problem 8.2-2. The plant frequency response \(G\left(j \omega_{w}ight)\) is given in Table P8.2-2. (a) Let the digital controller realize a gain \(K\), that is,...
-
Why are distribution pipes not sized according to maximum hourly demand plus fire flow instead of maximum daily demand plus fire flow?
-
Requests from users for system enhancements or changes are one of the more challenging aspects of systems support, as described in the textbook. Research this issue on the Web, and discuss it with...
-
A disc weight W = 100 N and radius r= 0.25 m supported at it center is acted up on by a constant couple of moment 6 Nm and a force of 50 N is applied to a cord wrapped around its periphery. The...
-
Explain the differences and similarities between fringe benefits and salary as forms of compensation.
-
Programmers say that one module can ___________ another, meaning that the first module causes the second module to execute. a. Declare b. Define c. Enact d. Call
-
The value stored in an uninitialized variable is _________. a. Null b. Garbage c. Compost d. Its identifier
-
In a flowchart, a rectangle represents ____________. a. Input b. A sentinel c. A question d. Processing
-
The \(x\) component of a car's velocity increases from 0 to \(+5.0 \mathrm{~m} / \mathrm{s}\) in \(1.0 \mathrm{~s}\), and then from \(+5.0 \mathrm{~m} / \mathrm{s}\) to \(+10 \mathrm{~m} /...
-
Describe how to determine the \(x\) component of the position of an object at a specific instant, given (a) a graph of position \(x\) as a function of time \(t\) and (b) an equation for \(x(t)\).
-
In an \(x(t)\) curve, what is the significance of a steep slope as opposed to a gentle slope? What is the significance of a curve that slopes downward as you move from left to right along the time...
Study smarter with the SolutionInn App