Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(In Python) Given a list with shopping cart items, you will need to write a program that takes a list containing an item's shopping category

(In Python)

Given a list with shopping cart items, you will need to write a program that takes a list containing an item's shopping category and an item's price and calculate the total price for the shopping cart. Clothing items will receive a 20% discount and grocery items will receive a 10% discount. I am giving you the list of items. This program should not take any input from an user.

Your list of shopping cart items:

shoppingCart = ["clothing", 59.95, "grocery", 10.50, "clothing", 13.95, "grocery", 5.76, "clothing", 39.97]

Your program will need:

at least 2 functions

1 function that takes a list

the final price rounded to 2 decimal places

Your final price is: $0000.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions