#Get the key of a minimum value from the following dictionary.
dict2 = {"Maths" : 55, "Physics" : 65, "Computer" : 75}
min_dict2 = min(dict2.values())
min_key = [key for key in dict2 if dict2[key]== min_dict2]
print(min_key)
['Maths']
# # Write a Python program to check if value 200 exists in the following dictionary.
GivenDict = {'a': 100, 'b': 200, 'c': 300}
UserInput = int(input("Enter a value which you want to check"))
for i in GivenDict.values():
if i == UserInput:
print(UserInput,"is present in the dictionary")
200 is present in the dictionary
# Merge two Python dictionaries into one
def Merge(dict1,dict2):
result = {**dict1,**dict2}
return result
dict1 = {'Ten': 10, 'Twenty': 20, 'Thirty': 30}
dict2 = {'Thirty': 30, 'Fourty': 40, 'Fifty': 50}
dict3 = Merge(dict1,dict2)
print(dict3)
{'Ten': 10, 'Twenty': 20, 'Thirty': 30, 'Fourty': 40, 'Fifty': 50}