Question
Must be in python Problem 1 An online retailer sells five products whose retail prices are as follows: Product 1, $2.98 Product 2, $4.50 Product
Must be in python
Problem 1
An online retailer sells five products whose retail prices are as follows:
Product 1, $2.98
Product 2, $4.50
Product 3, $9.98
Product 4, $4.49
Product 5, $6.87
Part A
Write a program that reads the quantity sold of each product and calculates and displays the total retail value of all products sold. Use a for loop to iterate through the products. Sample input/output:
Enter quantity sold of product 1: 2
Enter quantity sold of product 2: 6
Enter quantity sold of product 3: 3
Enter quantity sold of product 4: 7
Enter quantity sold of product 5: 1
Total $101.20
Part B
Rewrite problem 1 using a counter while loop.
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