Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- products = {'Shirt': 8, 'Shoe': 12, 'T-shirt': 4, 'Jacket': 15, 'Book': 2}
- discount_products = {}
- for product, price in products.items():
- if float(price) - 5 < 0.99:
- discount_price = 0.99
- else:
- discount_price = price - 5
- discount_products[product] = discount_price
Advertisement
Add Comment
Please, Sign In to add comment