Making a dictionary like oxford dictionary in python

 This is the blog in which i have written a piece of code to make a dictionary like oxford dictionary.

 It will give you an idea that how we can use dictionary in python.

NOTE--: I will discuss the features and functionality of the dictionary in the next blog post.

# Dictinary in python like oxford dictinary

d1 = {"programming":"the process or activity of writing computer programs",
"coding":"the process of assigning a code to something for classification or identification",

"inheritance":"inheritance is one of the most important feature of Object Oriented Programming Sub Class The class that inherits properties from another class is called Sub class or Derived Class",
"polymorphism":"In C++, polymorphism refers to the fact that the same entity (object or function) behaves differently in different situations.",
"encapsulation":"In general, encapsulation is a process of wrapping similar code in one place. In C++, we can bundle data members and functions that operate together inside a single class. "}

# In the above we have created a dictinary of limited words and meaning . you can expand it if you want.

print("Enter the keyword")
search = input() # Taking input of a word

print(d1[search]) # Printing the meaning

print("\n\n\nThank You for using dictinary....!\n Please rerun the program to find another word-meaning")

Output --:



Comments