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 23:00
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
You know the right answer?
Implement a function called payroll() that takes two string parameters the first of which represents...
Questions
question
History, 21.10.2020 17:01
question
Chemistry, 21.10.2020 17:01
Questions on the website: 13722361