subject

Implement a function called payroll() that takes two string parameters the first of which represents the name of an input file and the second of which represents the name of an output file. The input file contains lines with the following format: hours pay_rate where hours is an integer representing a number of hours worked and pay_rate is a floating point value representing the pay rate per hour. There will be some whitespace between the two values, although you may not make any assumptions about how much or what type. The function reads the input file line by line, computing the total pay (i. e. the product of the hours times the pay_rate -- we are not assuming overtime is computed for any of the values) and writing each amount to a newline in the output file. If the file is empty, the function should not write any numbers to the output file. Note that the strings read from the file will need to be evaluated before you can use them for computations. The following shows what the function would return when called on several sample files found in the zip file containing the assignment. The output files produced are also in the zip file

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Your company has 1,500 desktop computers running windows 7. you want to upgrade them to windows 10. which type of microsoft license would be best suited in this situation?
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
The salespeople at hyperactive media sales all use laptop computers so they can take data with them on the road. you are a salesperson for superduper lightspeed computers talking to hyperactive media sales about upgrading the laptops to windows 10. explain how network location awareness in windows 10 would make the laptops more secure.
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
You know the right answer?
Implement a function called payroll() that takes two string parameters the first of which represents...
Questions
question
Mathematics, 06.01.2021 21:00
question
English, 06.01.2021 21:00
question
Social Studies, 06.01.2021 21:00
Questions on the website: 13722362