2. Write a program that repeatedly asks the user to enter product names and prices. Store all of these in a dictionary whose keys are the product names and whose values are the prices. When the user is done entering products and prices, allow them to repeatedly enter a product name and print the corresponding price or a message if the product is not in the dictionary.

# Code

n = int(input(‘Enter number of products : ‘))
prod = {}
for i in range(n):
p = input(‘Enter product name : ‘)
prod[p] = int(input(‘Enter its price : ‘))

q = True
while q:
p = input(‘Enter product for price or q to exit : ‘)
if p == ‘q’:
break
if p in prod:
print(‘price of’, p, ‘is’, prod[p])
else:
print(p, ‘is not here’)