program6_1.py BetterBuy is having a sale. Write a program that uses a while loop to store to a file the names, regular prices, and price reductions (as percents) for selected items in the promotion. The program should enable the user to enter this data from the keyboard as shown below . Each datum should be stored on its own line in the file.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter17: Markov Chains
Section17.5: Steady-state Probabilities And Mean First Passage Times
Problem 10P
icon
Related questions
Question

program6_1.py
BetterBuy is having a sale. Write a program that uses a while loop to store to a file the namesregular prices, and price reductions (as percents) for selected items in the promotion. The program should enable the user to enter this data from the keyboard as shown below . Each datum should be stored on its own line in the file.

 

 

Enter item name or Enter to quit laptop
Enter item's regular price 899.99
Enter reduction percent for sale 25
Enter item name or Enter to quit router
Enter item's regular price 229.95
Enter reduction percent for sale 40
Enter item name or Enter to quit printer
Enter item's regular price 399.99
Enter reduction percent for sale 20
Enter item name or Enter to quit monitor
Enter item's regular price 425.79
Enter reduction percent for sale 30
Enter item name or Enter to quit
File was created
Transcribed Image Text:Enter item name or Enter to quit laptop Enter item's regular price 899.99 Enter reduction percent for sale 25 Enter item name or Enter to quit router Enter item's regular price 229.95 Enter reduction percent for sale 40 Enter item name or Enter to quit printer Enter item's regular price 399.99 Enter reduction percent for sale 20 Enter item name or Enter to quit monitor Enter item's regular price 425.79 Enter reduction percent for sale 30 Enter item name or Enter to quit File was created
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Graphical User Interface
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning