Python Exercise 1 - Apni Dictionary

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



Comments(8)

SachinJ at 2019-06-23 09:30:09 says
Tharoor= { "snollygoster": "https://en.wiktionary.org/wiki/snollygoster", "rodomontade":"https://en.wiktionary.org/wiki/rodomontade", "puerile":"https://en.wiktionary.org/wiki/puerility", "farrago":"https://en.wikipedia.org/wiki/Farrago"} word=input("Select a word from the above dictionary ") print("Kindly go to the link, it will give you much more information than just meaning and synonyms of",word,"\n", "Here is the link: ", Tharoor.get(word))
pawan at 2019-06-23 09:30:09 says
d2 = {"Cause-and-effect diagram":"https://en.wikipedia.org/wiki/Ishikawa_diagram", "Check sheet":"https://en.wikipedia.org/wiki/Check_sheet", "Control chart":"https://en.wikipedia.org/wiki/Control_chart", "Histogram":"https://en.wikipedia.org/wiki/Histogram", "Pareto chart":"https://en.wikipedia.org/wiki/Pareto_chart", "Scatter diagram":"https://en.wikipedia.org/wiki/Scatter_plot", "Stratification":"https://en.wikipedia.org/wiki/Stratification"} print("Enter the QC Tool Name:") print(d2[input()])
white_devil at 2019-06-23 09:30:09 says
dict1 = {"Harry": "Programmer", "Priyanshu": "Py Learner", "Larry": "Js Learner", "Carry": "Android Developer"} print("Copy One Of The Name And Paste It") print("1) Harry", "2) Priyanshu", "3) Larry", "4) Carry") a = input() print(dict1[a])
Manav_Seng at 2019-06-23 09:30:09 says
Python Excercise 1 apni dictionary Name:Manav Sengupta Solution(Copy and paste everything below): #This is the Question given by CodeWithHarry Channel #Python Excercise 1 #ApniDictionary #The following is the solution Word=['Tensor','Diffusion','Quantum','Calculus','Lemma']# Words Meanings=['A Rank n Tensor in m dimensions is a mathematical object which has n indices and m^n components which follow certain mathematical transformation rules','Diffusion is defined as the movement of substances from a region of higher concentration to a region of lower concentration down an concentration gradient','The smallest amount of a quantised quantity like charge is called its quantum','Calculus is the Branch of Mathematics which deals with the nature of change and allows to perform various mathematical operations on it','A Lemma is a proven statement used to prove other statements'] # Respective Meanings ApniDictionary={Word[0]:Meanings[0],Word[1]:Meanings[1],Word[2]:Meanings[2],Word[3]:Meanings[3],Word[4]:Meanings[4]} #Creation of Dictionary input_word=input("Enter Your Word") #User Input temp=input_word.capitalize() #Presentation Purposes #Input should be in lower case print("\n"+ temp+" : "+ApniDictionary[temp]+"\n") #Final Output print(147*"*"+"\n*"+145*" "+"*\n*"+9*" "+"Thanks for checking out my code, and a ton of thanks to CodewithHarry Channel for all the Quality Content for Free"+22*" "+"*\n*"+145*" "+"*\n"+147*"*") # Gratitude #Run the Code with the Run Terminal or Console enlarged more than default as the output take some space #The excercise could be done in lesser code but to balance preentation and code size which are tradeoffs, I think this solution is in the sweet spot. #Feel free(anyone) to give reviews and suggestions to the above exercise, Constructive critisizim is appreciated , but critisize ideas not people.
zadrain at 2019-06-23 09:30:09 says
x={"life":"a different journey for every humenbeing ", "death":"the action or fact of dying or being killed; the end of the life of a person ", "marriage":"the legally or formally recognized union of two people as partners in a personal relationship (historically and in some jurisdictions specifically a union between a man and a woman", "education":"the process of receiving or giving systematic instruction, especially at a school or university."} print(x[input("type here in lower case")])
arnavc06 at 2019-06-23 09:30:09 says
Helpful
nazishali at 2019-06-23 09:30:09 says
# create a dictionary and take input from the user and return the meaning of the word from the dictionary print("for making a dictionary input 5 string") a1 = input() m1 = input("Enter meaning of the word:") a2 = input() m2 = input("Enter meaning of the word:") a3 = input() m3 = input("Enter meaning of the word:") a4 = input() m4 = input("Enter meaning of the word:") a5 = input() m5 = input("Enter meaning of the word:") dict4 = {a1:m1,a2:m2,a3:m3,a4:m4,a5:m5} a7 = input(print("search from dictionary:")) if a7 in dict4: print(dict4.get(a7))
saswata at 2019-06-23 09:30:09 says
import wikipedia dict = {'virus':'https://en.wikipedia.org/wiki/Virus', 'asteroid':'https://en.wikipedia.org/wiki/Asteroid', 'AI':'https://en.wikipedia.org/wiki/Artificial_intelligence' } word = list(dict.items()) print(word) word = input('Enter thr word: ') for i,j in dict.items(): if (word==i): print(wikipedia.summary(j, sentences=2)) else: print('Sorry')