1. Engineering
  2. Computer Science
  3. workerstext id rate hours 1001 125 140 1002 130 300...

Question: workerstext id rate hours 1001 125 140 1002 130 300...

Question details

workers.text

ID RATE HOURS

1001   12.5  14.0
1002   13.0  30.0
1003   15.0  40.0
1004   17.0  30.0

Write a program to read data stored in “workers.txt”, that has data of 4 workers in it. Calculate the gross pay for each worker (gross pay = hourly rate * number of work hours). Display worker ID and the gross pay of each worker on computer screen.

The following is an example.

ID: 1001 Gross Pay: 175.0

ID: 1002 Gross Pay: 390.0

ID: 1003 Gross Pay: 600.0

ID: 1004 Gross Pay: 510.0

using Python

 
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution