Question: 2. Simple Calculation: Write a program that will allow the user to enter the price and quantity of items purchased. The program will terminate if

 2. Simple Calculation: Write a program that will allow the user

2. Simple Calculation: Write a program that will allow the user to enter the price and quantity of items purchased. The program will terminate if the user enters a negative price value. The program must do the following: 1. Read the item price from the user 2. Read the item's number from the user 3. Multiply the price by number and add it to the total First write an algorithm for the program and then write the program. This can be done ir the python file, need to comment out the algorithm. Sample Output: Enter price (negative value to stop) : 2.3 Enter the number of items: 5 Enter the item price: 11.20 Enter the number of items: 2 Enter the item price: 5 Enter the number of items: 2 Enter the item price: 10.50 Enter the number of items: 1 Enter the item price: 7 The total price is: 54.4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!