Write a program to input your friends' names and their Phone Numbers and store them in the dictionary as the key-value pair. Perform the following operations on the dictionary:
Display the name and phone number of all your friends
Add a new key-value pair in this dictionary and display the modified dictionary
Delete a particular friend from the dictionary
Modify the phone number of an existing friend
Check if a friend is present in the dictionary or not
Display the dictionary in sorted order of names
Explanation
This program demonstrates all dictionary operations as per NCERT Class 11 syllabus. The program uses concepts from Program 10-6 for creating dictionaries using input, and Program 10-5 for dictionary operations. Key operations include: (a) using a for loop with keys() to iterate and display all items, (b) adding new entries using assignment operator, (c) using del statement to remove items as shown in context, (d) modifying values by reassigning to existing keys, (e) using 'in' operator to check membership, and (f) using sorted() function to display keys in alphabetical order. The 'in' operator checks if a key exists in the dictionary, which is a standard dictionary operation mentioned in Table 10.2.