Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def tax(shopping_cart, percent): Adds a `percent` tax to each item's price in a shopping cart. >>> fruitCart = [(apple, 0.5, 3), (banana, 0.25, 4)]
def tax(shopping_cart, percent):
"""
Adds a `percent` tax to each item's price in a shopping cart.
>>> fruitCart = [("apple", 0.5, 3), ("banana", 0.25, 4)]
>>> tax(fruitCart, 10)
[('apple', 0.55, 3), ('banana', 0.275, 4)]
>>> calCart = [("oski", 1000, 1), ("go", 1, 2), ("bears", 3.5, 2)]
>>> tax(calCart, 100)
[('oski', 2000.0, 1), ('go', 2.0, 2), ('bears', 7.0, 2)]
"""
return____________
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