PYTHON help- Beginner program6_2.py This program reads the text file created in the program 6_1 and displays its data. Use f-strings to create a table with a row for each item and the columns as shown below. $ signs are not required. Choose your own column widths but include column headings as shown. Here is my program6_1 f = open('data.txt', 'w') while(True): name = input("Enter item name or Enter to quit ") if name == "" : break cost = input("Enter item's regular price ") reduction = input("Enter reduction percent for sale ") f.write(name + ' ' + cost + ' ' + reduction + ' \n') f.close() print(f"File was created")
PYTHON help- Beginner program6_2.py This program reads the text file created in the program 6_1 and displays its data. Use f-strings to create a table with a row for each item and the columns as shown below. $ signs are not required. Choose your own column widths but include column headings as shown. Here is my program6_1 f = open('data.txt', 'w') while(True): name = input("Enter item name or Enter to quit ") if name == "" : break cost = input("Enter item's regular price ") reduction = input("Enter reduction percent for sale ") f.write(name + ' ' + cost + ' ' + reduction + ' \n') f.close() print(f"File was created")
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
PYTHON help- Beginner
program6_2.py
This program reads the text file created in the program 6_1 and displays its data. Use f-strings to create a table with a row for each item and the columns as shown below. $ signs are not required. Choose your own column widths but include column headings as shown.
Here is my program6_1
f = open('data.txt', 'w')
while(True):
name = input("Enter item name or Enter to quit ")
if name == "" :
break
cost = input("Enter item's regular price ")
reduction = input("Enter reduction percent for sale ")
f.write(name + ' ' + cost + ' ' + reduction + ' \n')
f.close()
print(f"File was created")
![ITEM
REG. PRICE
REDUCED
SALE PRICE
laptop
899.99
225.00
674.99
router
229.95
91.98
137.97
printer
monitor
399.99
80.00
319.99
425.79
127.74
298.05](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F99ef9c86-1eb9-406e-b838-8b9add9c4630%2F7b9e5a59-379d-4e46-9c89-80c0fee522af%2Fdphazkn_processed.png&w=3840&q=75)
Transcribed Image Text:ITEM
REG. PRICE
REDUCED
SALE PRICE
laptop
899.99
225.00
674.99
router
229.95
91.98
137.97
printer
monitor
399.99
80.00
319.99
425.79
127.74
298.05
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 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
![2
of 4
Automatic Zoom
View as Text
Download
>>
LAB ASSIGNMENTS
IMPORTANT: you should complete the PDP thinking process for
each program. Turn in items:
1) book_list.py: you can adapt your Chapter 4 book_list.py Lab
program. The program summarizes costs of a book list.
It uses all of our standard mipo_ex features.
This program summarizes a book list.
Enter the number of books that you need:
In this version of the program you must use pylnputPlus
functions to perform all the input validation and for the main()
loop decision.
Please enter a whole number: three
Enter a number greater than 0: 3
Enter the name of book #1: The Mueller Report
Enter cost of The Mueller Report, to the nearest dollar:
Please enter a whole number: 18
Enter the name of book #2: Educated: A Memoir
Enter cost of Educated: A Memoir, to the nearest dollar:
Please enter a whole number: 24
08
Adjust your program to allow book prices to include $ and
cents. Restrict individual book prices to $100 maxium.
Enter the name of book #3: Becoming
Enter cost of Becoming, to the nearest dollar:
Please enter a whole number: 12
Info on 3 Books Needed
Books
The Mueller Report
Educated: A Memoir
Clearly document, with comments, your use of the pyip
Price
functions.
18.00
24.00
Becoming
12.00
Total
54.00
Average
Need more books? Enter y or n:
18.00](https://content.bartleby.com/qna-images/question/4204f9cf-6056-4e12-902e-ec4115e3f9c4/af255dbc-4778-4572-b7ef-ca10dfe832de/zjg4bbi_thumbnail.png)
Transcribed Image Text:2
of 4
Automatic Zoom
View as Text
Download
>>
LAB ASSIGNMENTS
IMPORTANT: you should complete the PDP thinking process for
each program. Turn in items:
1) book_list.py: you can adapt your Chapter 4 book_list.py Lab
program. The program summarizes costs of a book list.
It uses all of our standard mipo_ex features.
This program summarizes a book list.
Enter the number of books that you need:
In this version of the program you must use pylnputPlus
functions to perform all the input validation and for the main()
loop decision.
Please enter a whole number: three
Enter a number greater than 0: 3
Enter the name of book #1: The Mueller Report
Enter cost of The Mueller Report, to the nearest dollar:
Please enter a whole number: 18
Enter the name of book #2: Educated: A Memoir
Enter cost of Educated: A Memoir, to the nearest dollar:
Please enter a whole number: 24
08
Adjust your program to allow book prices to include $ and
cents. Restrict individual book prices to $100 maxium.
Enter the name of book #3: Becoming
Enter cost of Becoming, to the nearest dollar:
Please enter a whole number: 12
Info on 3 Books Needed
Books
The Mueller Report
Educated: A Memoir
Clearly document, with comments, your use of the pyip
Price
functions.
18.00
24.00
Becoming
12.00
Total
54.00
Average
Need more books? Enter y or n:
18.00
Solution
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY