subject
Computers and Technology, 07.05.2021 21:10 frisha

This assignment's primary purpose is to practice reading from a text file and writing to a text file. We will use several string functions in the process. There are more than one ways to read from and write to a file. You will have the freedom to choose ways to read and write. We will assume there are no errors in the file format as specified below to simplify the tasks. [2] Description: You are implementing a simple payroll system. We have the primary employee data stored in a file (id, last and first names, pay rate) stored in a comma-separated values (CSV) format. The ID is unique. We also have a log of sign-in and sign-out of each employee (timestamp and id separated by two spaces). Assume the first timestamp if for sign in, and the second one with the same id is for sign out. They always come in a pair in the second file. The timestamp is in the format of hh:mm:ss where hh is from 0 to 23 (military time) and ss should be ignored for this assignment. You have to read from these two files, calculate the amount of pay each day (not very realistic). Finally, write the pay log to a file. See the sample program for the format of these files. Here is what you need to do. • Build a table of employees (prog-10-emp. txt), and you can decide whatever format to store the data, print the table • Build a table of sign-in/out log (prog-10-clock. txt), print the table Calculate the amount of pay for each employee, Write a pay log to a text file (prog-10-pay. txt) and to the screen. The program is longer than the last one because you have to open/close three files. One can do a lot by calling library functions to do the work in Python. The code that I tested is less than 60 lines. (3) Requirements: For the past few assignments, I have given you specific guidelines on what functions to write. You will have to decide that in this assignment. [4] Input and Output: See sample outputs below and the demo in class. [5] Deadline: Midnight Monday, April 26, 2021 (?). The due date may depend on when we are done with the chapter on Files. Prog-10-emp. txt 1077, Huang, Stephen, 10.00 1002, Smith, John Jr., 20.00 1003, Doe, Jane, 42.60 1004, Carter, James, 19.50 1005, Johnson, Olin, 21.00 1099, Shah, Shishir, 30.00 Prog-10-clock. txt 07:59:01 1077 08:00:15 1003 08:01:00 1004 08:01:30 1002 08:10:09 1005 10:01:01 1099 15:59:01 1077 16:11:15 1003 16:21:00 1004 16:30:00 1099 17:01:30 1002 17:10:09 1005 Id Last Name 1077 Huang 1002 Smith 1003 Doe 1004 Carter 1005 Johnson 1099 Shah First Name Stephen John Jr. Jane James Olin Shishir Pay Rate 10.00 20.00 42.60 19.50 21.00 30.00 Timestamp Id 08:01:30 1002 17:01:30 1002 08:00:15 1003 16:11:15 1003 08:01:00 1004 16:21:00 1004 08:10:09 1005 17:10:09 1005 07:59:01 1077 15:59:01 1077 10:01:01 1099 16:30:00 1099 ID 1002 1003 1004 1005 1077 1099 Hours 9.00 8.18 8.33 9.00 8.00 6.48 Amount 180.00 348.61 162.50 189.00 80.00 194.50

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
You know the right answer?
This assignment's primary purpose is to practice reading from a text file and writing to a text file...
Questions
question
Mathematics, 29.10.2020 16:40