Dictionaries: Key-value structure, methods (get(), items(), etc.), Practice exercises combining functions, loops, and collections.

  1. Write a Python program to create a dictionary containing student details and display all key-value pairs ?
  2. Write a Python program to retrieve a student's CGPA using the `get()` method ?
  3. Write a Python program to display all dictionary keys ?
  4. Write a Python program to display all dictionary values ?
  5. Write a Python program to display all key-value pairs using the `items()` method ?
  6. Write a Python program to add a new key-value pair to a dictionary ?
  7. Write a Python program to update an employee's salary using a dictionary ?
  8. Write a Python program to remove a specified key from a dictionary using the `pop()` method ?
  9. Write a Python program to count the frequency of each character in a string using a dictionary ?
  10. Write a Python program to count the frequency of words in a sentence using a dictionary ?
  11. Write a Python program to find the student with the highest CGPA from a dictionary ?
  12. Write a Python program to merge two dictionaries ?
  13. Write a Python program to display dictionary elements in sorted order of keys ?
  14. Write a Python program to create a dictionary from two lists ?
  15. Write a Python program to calculate the total value of all products stored in a dictionary ?
  16. Write a Python program to create a function that returns the frequency of elements in a list using a dictionary ?
  17. Write a Python program to create a dictionary of student marks and return the topper using a function ?
  18. Write a Python program to create a dictionary containing employee IDs and salaries, then calculate the average salary using a function ?
  19. Write a Python program to count vowels and consonants in a string using a dictionary and user-defined function ?
  20. Write a Python program to implement a Student Management System using dictionaries, loops, functions, and collections ?
Previous Topic Tuples: Immutable nature, tuple unpacking Next Topic Sets creation {} vs set(.