Question: Write a Python application which reads data from three input files into three lists: products.txt: stores the names of products, one per line. prices.txt: stores
Write a Python application which reads data from three input files into three lists:
products.txt: stores the names of products, one per line.
prices.txt: stores of the prices of products, one per line.
quantitites.txt: stores the currenct quantity on hand of a product, one per line.
The data in each of these input files is stored in sequence, so that the first line of each file refers to the same product, the second line of each file refers to the same product, etc.
The product name is stored as a string. Remove the final character from the string using : when storing it in the list.
The prices are all real number float data.
The quantities are all integer int data.
Find the extended value for each product by multiplying its price by its quantity. You may create a list to store the extended values.
Find the grand total of the inventory by adding together the extended values.
Produce the following output by accessing data from your lists:
Product Name Price Qty Value
Li Hing Mango
Wet Lemon Peel
Red Iso Peanut
Salty Seed
Mixed Arare
Shredded Ika
Imperial Mix
Mini Mori Maki
Taro Chips
Banana Chips
Grand Total:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
