Question: Write a Python program for the Express (less than 10 items) lane at a supermarket. Use the main function and a value-returning function named subtotal

Write a Python program for the Express (less than 10 items) lane at a supermarket. Use the main function and a value-returning function named subtotal

The main function must prompts for the number of different items in the customer's cart and uses a loop to execute the subtotal function for each item. It must also catch the value returned by subtotal and add it to the total then prints the total after all items have been processed

The subtotal function needs to be defined with no parameters. prompts for the unit price and quantity of each item calculates and prints the subtotal and then returns the subtotal to main

sample

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!