Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- products = {'shoes':{'name':' Woodlands',
- 'price':15000},
- 'shirt':{'name':'Avengers shirt',
- 'price':2900}
- }
- def fun_discount(product,dis):
- p = products[product]['price']
- final_price = p - int(p * (dis/100))
- assert ( 0 <= final_price)
- return (final_price)
- print(fun_discount('shirt',100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement