Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Eureka Lumber Company would like to calculate the gross pay for its employees. The emplovees information is stored in a file as name D number
Eureka Lumber Company would like to calculate the gross pay for its employees. The emplovees information is stored in a file as name D number pavtpeav rateboursworked. The fields are separated by a tab "\t" delimiter, and they are described as follows a. name is a string value b. ID number is a numeric integer value c. pay type is a character, either H for hourly, or S for salary d. pavrate will hold the hourly rate for an hourly paytype, or it would hold the total salary for a salary pay tvpe e. bours werked holds the total number of work hours for the employee The employee gross pay is compute as follows: If employee pay type is hourly gross pay- pay rate * hours worked Else if employee paytype is salary based gross pay pay ra te 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) Pay Type Name Kelly Jason Alice Debra Gordon Hours Worked 32 40 40 19 23 ID Pay Rate 12 700 720 13 12 4 5 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
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