Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program to calculate the price of a fruit gift basket A price file is a text file that contains one price per line
Write a program to calculate the price of a fruit gift basket
A price file is a text file that contains one price per line
The first line is the price for item apples
The second line is the price for item oranges
And so on
For example:
An order CSV file contains an item number and quantity on each line. For example,
Prompt the user for the price file and the order file
Calculate the price of the basket by summing each price multiplied by quantity
Print the total
Sample Run #bold underlined text is what the user types:
Price file? prices.txt
Basket file? order.csv
Basket will cost $
Test # checks all output
Mini Test # output includes Basket will cost $
Sample Run #bold underlined text is what the user types:
Price file? pricestxt
Basket file? ordercsv
Basket will cost $
Note: This is an introductory level class so no classes or too advanced programming. This programs requires the user to create a text file as well as a csv file while the program is running.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started