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
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