W.A.P that repeatedly ask the were to enter product
name and prices then store all of these in a
dict. whose keys are the product names are values
the price
Answers
Answered by
1
products = {}
search = lambda product: products[product] if product in products else None
for _ in range(10):
product, price = input("product: "), float(input("price: "))
products[product] = price
print()
print("Price: ", search((product := input("search product: "))))
Answered by
2
Answer:
????????????????????
Explanation:
????????????????????
Similar questions