Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to put the following into python code and I'm having a hard time with both the code and the .txt that needs to

I need to put the following into python code and I'm having a hard time with both the code and the .txt that needs to be made in order to import over to python.

image text in transcribed

Outputs:

Rec Cnt: 1 name Kelly ID 1 payType H payRate 12.0 hours 32 Gross Pay >> 384.0 =-=-=-=-=-=-=-=-=-= =-=-=-=-=-=-=-=-=-= Rec Cnt: 2 name Jason ID 1 payType S payRate 700.0 hours 40 Gross Pay >> 700.0 =-=-=-=-=-=-=-=-=-= =-=-=-=-=-=-=-=-=-= Rec Cnt: 3 name Alice ID 1 payType S payRate 720.0 hours 40 Gross Pay >> 720.0 =-=-=-=-=-=-=-=-=-= =-=-=-=-=-=-=-=-=-= Rec Cnt: 4 name Debra ID 1 payType H payRate 13.0 hours 19 Gross Pay >> 247.0 =-=-=-=-=-=-=-=-=-= =-=-=-=-=-=-=-=-=-= Rec Cnt: 5 name Gordon ID 1 payType H payRate 12.0 hours 23 Gross Pay >> 276.0 =-=-=-=-=-=-=-=-=-=

Eureka Lumber Company would like to calculate the gross pay for its employees. The employees' information is stored in a file as Requirements: Record Layout: The fields are fixed length (name 6 - characters, ID - 1 character, pay type - 1 character, pa rate - 3 characters, hours - 2 characters, newline character at end of each line - 1 characte = total 14 characters. 1. name is a string value 2. ID_number is a numeric integer value 3. pay_type is a character, either H for hourly, or S for salary 4. pay_rate either holds the hourly rate for an hourly pay_type, or it holds the total salary for a salary pay_type. 5. hours_worked holds the total number of work hours for the employee The employee gross pay is computed as follows: If employee pay_type is hourly gross pay = pay_rate * 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

please dont use chat gpt 2 4 .

Answered: 1 week ago

Question

Why should marketing managers consider stakeholders?

Answered: 1 week ago