The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following: Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period.
The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the file is the following: Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
Related questions
Question
python coding
![The Payroll Department keeps a list of employee
data.txt
payroll.py
+
information for each pay period in a text file. The format
of each line of the file is the following:
1 Lambert 34 10.50
<last name> <hours worked> <hourly wage>
2 Osborne 22 6.25
3 Giacometti 5 100.70
Write a program that inputs a filename from the user and
4
prints to the terminal a report of the wages paid to the
employees for the given period.
The report should be in tabular format with the
data.txt
payroll.py
appropriate header.
1 # Put your code here
Each line should contain:
• An employee's name
o The hours worked
o The wages paid for that period.
An example of the program input and output is shown
below:
Enter the file name: data.txt
Name
Hours
Total Pay
Lambert
34
357.00
Osborne
22
137.50
Giacometti
503.50
+](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fd37e2ed8-d19a-4d84-a03c-203dab5c0742%2Fa9061de2-d357-40ee-aa30-9ac332c648ac%2F2y4s4xt_processed.png&w=3840&q=75)
Transcribed Image Text:The Payroll Department keeps a list of employee
data.txt
payroll.py
+
information for each pay period in a text file. The format
of each line of the file is the following:
1 Lambert 34 10.50
<last name> <hours worked> <hourly wage>
2 Osborne 22 6.25
3 Giacometti 5 100.70
Write a program that inputs a filename from the user and
4
prints to the terminal a report of the wages paid to the
employees for the given period.
The report should be in tabular format with the
data.txt
payroll.py
appropriate header.
1 # Put your code here
Each line should contain:
• An employee's name
o The hours worked
o The wages paid for that period.
An example of the program input and output is shown
below:
Enter the file name: data.txt
Name
Hours
Total Pay
Lambert
34
357.00
Osborne
22
137.50
Giacometti
503.50
+
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT