Assignment-5 ============ 1. Get the key of a minimum value from the following dictionary. Given Input: sample_dict = { 'Physics': 82, 'Math': 65, 'history': 75 } Expected output: Math Ans:- ===== sample_dict = { 'Physics': 82, 'Math': 65, 'history': 75 } print("Given Input : ",sample_dict) min_key = min(sample_dict.values()) res = [key for key in sample_dict if sample_dict[key] == min_key] print("Minimum value :",res) Output:- ========   Given Input : {'Physics': 82, 'Math': 65, 'history': 75} Minimum value : ['Math'] ========================================================================================= 2. Write a Python program to check if value 200 exists in the following dictionary. Given Input: sample_dict = {'a': 100, 'b': 200, 'c': 300} Expected output: 200 present in a dict Ans:- ===== sample_dict = {'a': 100, 'b': 200, 'c': 300} if(200 in sample_dict.values()): print("200 present in a Dict") else: print("200 not present in a Dict") Output:- ========   200 present in a Dict ============================================================================================ 3. Merge two Python dictionaries into one Given Input: dict1 = {'Ten': 10, 'Twenty': 20, 'Thirty': 30} dict2 = {'Thirty': 30, 'Fourty': 40, 'Fifty': 50} Expected output: {'Ten': 10, 'Twenty': 20, 'Thirty': 30, 'Fourty': 40, 'Fifty': 50} Ans:- ===== # Python code to merge dict using update() method def Merge(dict1, dict2): return(dict1.update(dict2)) # This returns None dict1 = {'Ten': 10, 'Twenty': 20, 'Thirty': 30} dict2 = {'Thirty': 30, 'Fourty': 40, 'Fifty': 50} # This returns None //Just for my knowledge tesing this line #print(Merge(dict1, dict2)) Merge(dict1, dict2) # changes made in dict1 print(dict1) Output:- ========   {'Ten': 10, 'Twenty': 20, 'Thirty': 30, 'Fourty': 40, 'Fifty': 50}