Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. products = {'shoes':{'name':' Woodlands',
  2. 'price':15000},
  3. 'shirt':{'name':'Avengers shirt',
  4. 'price':2900}
  5. }
  6.  
  7.  
  8. def fun_discount(product,dis):
  9. p = products[product]['price']
  10. final_price = p - int(p * (dis/100))
  11. assert ( 0 <= final_price)
  12. return (final_price)
  13.  
  14. print(fun_discount('shirt',100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement