Answered step by step
Verified Expert Solution
Link Copied!

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

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

Recommended Textbook for

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions