A company stores payment information for their employee working on a project and paid on project basis, in a text file whose name is entered through keyboard (see a sample input fil- Delow). The first line of the file indicates the number of employees and each subsequent lin. corresponds to information related to an employee payment (employee name, number of hour vorked and his/her hourly wage). Write a python program that reads such a file and display he employees' names, their hours worked, and their salaries. Finally, it displays the tota payıment. Your program should consider the following CIToncous cases: The file does not open/exist The format of the data in the file is incorrect (e.g. hours =“1-" or salary = "unkown" in which case a RuntimeError exception should be raised and the processing shoul. %3D continue
A company stores payment information for their employee working on a project and paid on project basis, in a text file whose name is entered through keyboard (see a sample input fil- Delow). The first line of the file indicates the number of employees and each subsequent lin. corresponds to information related to an employee payment (employee name, number of hour vorked and his/her hourly wage). Write a python program that reads such a file and display he employees' names, their hours worked, and their salaries. Finally, it displays the tota payıment. Your program should consider the following CIToncous cases: The file does not open/exist The format of the data in the file is incorrect (e.g. hours =“1-" or salary = "unkown" in which case a RuntimeError exception should be raised and the processing shoul. %3D continue
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 13PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage