Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Lab7 Saved to this PC A Lucy Calhoun - File Home insert Design Layout References Mailings Review View Help Tell me what you want to
Lab7 Saved to this PC A Lucy Calhoun - File Home insert Design Layout References Mailings Review View Help Tell me what you want to do Share Comments Celibri (Body) Editing Paste Normal No Spa. Heading 1 Clipboard Paragraph Styles AutoSave a) For problem 1 in assignment 7, write a python script that creates a file with the given format, inserts five employees into that file with the following information: (20 points) Hours Worked 32 40 40 19 23 Name ID ason Alice Debra Gordon Pay Rate 12 700 720 13 12 b) For the same problem, convert the algorithm from your solution into Python code. Your code should output each employee's name, ID, pay type, pay rate, hours worked, and the calculated gross pay. (20 points) Each employee's information should be printed on the same line. Information for each employee should be printed on a separate line. Lab Deliverables: Take a screen shot for your code for part a and part b, along with a snap shot of your obtained Page 1 of 1 177 words - 100% O Type here to search 3:40 PM 2/25/2019 22) A7-1 A Lucy Calhoun - File Home Insert Design Layout References Mailings Review View Help Tell me what you want to do Share Comments Celibri (Body) La Editing Paste Normal No Spa. Heading 1 Dictate Clipboard Font Paragraph Styles Voice AutoSave (-8 U D Eureka Lumber Company would like to calculate the gross pay for its employees. The employees information is stored in a file as namelD number pa.type pa..rate hours worked. The fields are separated by a tab "Mt" delimiter, and they are described as follows: a. name is a string value b. ID number is a numeric integer value c. pay tyR is a character, either H for hourly, or S for salary d. pay rate will hold the hourly rate for an hourly pay type,or it would hold the total salary for a salary pay type hours worked holds the total number of work hours for the employee e. The employee gross pay is compute as follows: If employee pay type is hourly gross pay pay rate * hours worked gross pay = parate+ hours-worked Else if employee pay type is salary based gross pay- pay rate Develop a solution for the problem of reading each employee's information from the file, computing her gross pay, and then printing out all the employee information along with her gross pay Page 1 of4 318words - 100% O Type here to search 3:40 PM 2/25/2019 22)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started