If the key is present then display the value of the entered key and if the key is not present then display the appropriate message

**Input:**

1. Get size of the dictionary

2. Get the key-value elements

3. Get the key to be searched

**Output:**

1. Display the dictionary

2. Print either True or False

**INPUT
**Size of dictionary: 2
25
20
1252
1120
Key: 20
**
OUTPUT**
The dictionary is {25: 1252, 20: 1120}
True

n=int(input("Size of dictionary: ")) d={} kl=[] vl=[] for i in range(n): k=int(input()) kl.append(k) for i in range(n): k=int(input()) vl.append(k) for i in range(n): d[kl[i]]=vl[i] print("The dictionary is ",d) search=int(input("\nKey to be Searched: ")) c=0 for k,v in d.items(): if search==k: c=c+1 print("True") if c==0: print("False")

**OUTPUT:**

Size of dictionary: 2

25

20

1252

1120

The dictionary is {25: 1252, 20: 1120}

Key to be Searched: 20

True

**OUTPUT:**Size of dictionary: 2

50

60

200

2000

The dictionary is {50: 200, 60: 2000}

Key to be Searched: 25

False

**ILLUSTRATION**

**Morae Q!**

- OS operating system module using path parameter.
- Find the smallest and largest integers after sorting using bubble sort.
- Find the integer and its number of occurrences.
- Algorithm complexity – Big O Notation with Examples.
- Linear search.
- Map module using series mapping and parallel mapping.
- Mapping and Transposing with Map Module.
- Map Module/built-in Function.
- Linux commands for managing files.
- Program which takes two lists and maps two lists into a dictionary.
- Splitting strings and substituting using regular expressions regex.
- Basics of regular expression Regex.
- Find the square value of the dictionary.
- Check whether the given key is present in the dictionary.
- Matching an expression only in specific places using regular expressions.
- Escaping special characters using regular expressions.
- Check the key.
- Grouping and sub-grouping using regular expressions.
- Generate a Dictionary that Contains Numbers in the Form (x , x*x).
- Algorithm complexity Big-Theta, Big-Omega and Big-O Notations.