Course Content

Exercise 1 - Solution And Your Answers

Hope you enjoyed programming the task. Once again for your convenience, I am sharing below the problem statement:

Problem Statement:

So, in this tutorial i.e. Python exercise 1 tutorial, what we have to do is to create a dictionary, similar to the real-world dictionary. There is no limit to the definition you provide to any word as this exercise is just for your practice.

The details and functionalities that are essential and must be present are:

  • User will give a word as an input. Suppose that the word is present in your dictionary along with its definition or meaning.
  • The program will print the meaning or definition of that word.

For example:

The user inputs the word : “programming”

The output will be:

 "the process of writing computer programs"

Your main focus should be towards writing a neat and efficient code, using only the knowledge from our previously done tutorials.

Code file as described in the video

# Create a dictionary and take input from the user and return the meaning of the
# word from the dictionary

Dict = {"ignore":"refuse to take notice of or acknowledge", "abandon":"cease to support or look after",
        "exaggerate":"enlarged or altered beyond normal proportions", "prejudice":"preconceived opinion that is not based on reason or actual experience"}
print("Enter the Word")
Data1 = input()
print(Data1, "means", Dict[Data1])

Comments(2)

Vivek-Mishra 5 months, 1 week ago
Full Notes and Source Code ::::::::::} https://github.com/Optimized-World/Complete-Python-Tutorial-and-Notes |::::::::::::| Thanks, Harry Bhai for Awesome Tutorials
kunjshah 3 months, 2 weeks ago
vocab={"desire":"To do something","Abundant":"More","Urge":"To get something","Epilogue":"Starting of novel"}
print("Enter the word to get the meaning:")
v1=input()
print("Meaning is:",vocab[v1])

Resources

No downloadable resources for this video. If you think you need anything, please post it in the QnA!

Course Announcements

Any Course related announcements will be posted here