et of data where each row represents a day of the week and each entry on the row represents a block of time worked, like this: 1.5h 3.25h 8.eh 6.0h 1.On 5. 5h 2.25h e.75h 2.25h 3.0h 3.en 5.75h 2.25h report could be produced by a program like this: 0.00h 0.00h 5.25h 1.50n 3.25h e.seh 10.e0h | 3.0en 6.00h 1.een 8.50h 8.25h 8.00h i 5.75h 2.25h e.00h | e.e0h 5.5eh 2.25h 0.75h 2.25h 3.00h 3.00h leekly Total: 40.00h otice how in the output file all the numbers are nicely formatted as right-aligned. Hint: you will probably need to use splitting, string.slicing, converting data pes, and string formatting.
et of data where each row represents a day of the week and each entry on the row represents a block of time worked, like this: 1.5h 3.25h 8.eh 6.0h 1.On 5. 5h 2.25h e.75h 2.25h 3.0h 3.en 5.75h 2.25h report could be produced by a program like this: 0.00h 0.00h 5.25h 1.50n 3.25h e.seh 10.e0h | 3.0en 6.00h 1.een 8.50h 8.25h 8.00h i 5.75h 2.25h e.00h | e.e0h 5.5eh 2.25h 0.75h 2.25h 3.00h 3.00h leekly Total: 40.00h otice how in the output file all the numbers are nicely formatted as right-aligned. Hint: you will probably need to use splitting, string.slicing, converting data pes, and string formatting.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
![2. [summary_report.py] Timesheet data is easy to represent in a file, where it can be used to generate a report and help the worker get paid! Given an example
set of data where each row represents a day of the week and each entry on the row represents a block of time worked, like this:
1.5h 3.25h
3.8h 6.Oh 1.eh
5. 5h 2.25h 0.75h
2.25h 3.0h 3.0h
5.75h 2.25h
A report could be produced by a program like this:
0.00h |
5.25h | 1.5en 3.25h 0.5eh
10.00h
0.00h
3.00h 6.00h 1.00h
8.50h
5.50h 2.25h 8.75h
8.25h
8.00h
0.00h | e.00h
2.25h 3.00h 3.00h
5.75h 2.25h
Weekly Total: 40.00h
Notice how in the output file all the numbers are nicely formatted as right-aligned. Hint: you will probably need to use splitting, string slicing, converting data
types, and string formatting.
create a program that uses a data file that you have created, parses the data in that file to create a calculation per row and a running
total, then writes the report to an output file. Your program should prompt a user to input a file containing the data, then prompt the user to enter a file name
for outputting the report and the total, formatted similarly to the example above. Here is an example interaction for our timesheet example:
Enter timesheet file name: mcbride_timesheet_20210606.txt
Enter name for report file: mcbride_timereport_20210606.txt
Done writing totals to mcbride timereport_20210606. txt](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5f3939d2-8628-49ec-aee1-0700582cb2e9%2F7e827fc3-6681-4919-9a92-7aee4f9d90fd%2Fyryegp_processed.jpeg&w=3840&q=75)
Transcribed Image Text:2. [summary_report.py] Timesheet data is easy to represent in a file, where it can be used to generate a report and help the worker get paid! Given an example
set of data where each row represents a day of the week and each entry on the row represents a block of time worked, like this:
1.5h 3.25h
3.8h 6.Oh 1.eh
5. 5h 2.25h 0.75h
2.25h 3.0h 3.0h
5.75h 2.25h
A report could be produced by a program like this:
0.00h |
5.25h | 1.5en 3.25h 0.5eh
10.00h
0.00h
3.00h 6.00h 1.00h
8.50h
5.50h 2.25h 8.75h
8.25h
8.00h
0.00h | e.00h
2.25h 3.00h 3.00h
5.75h 2.25h
Weekly Total: 40.00h
Notice how in the output file all the numbers are nicely formatted as right-aligned. Hint: you will probably need to use splitting, string slicing, converting data
types, and string formatting.
create a program that uses a data file that you have created, parses the data in that file to create a calculation per row and a running
total, then writes the report to an output file. Your program should prompt a user to input a file containing the data, then prompt the user to enter a file name
for outputting the report and the total, formatted similarly to the example above. Here is an example interaction for our timesheet example:
Enter timesheet file name: mcbride_timesheet_20210606.txt
Enter name for report file: mcbride_timereport_20210606.txt
Done writing totals to mcbride timereport_20210606. txt
Expert Solution

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 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

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education