Skip to content

Write a Python program to print the highest and lowest values in the dictionary .

Class 11th IP (065)

Write a Python program to print the highest and lowest values in the dictionary.

SOLUTION..

data = {} n = int(input("Enter number of entries: ")) for i in range(n): key = input("Enter key: ") value = int(input("Enter value: ")) data[key] = value print("Dictionary:", data) print("Highest =", max(data.values())) print("Lowest =", min(data.values()))