+ 4

How can built a english dictionary in python

26th Dec 2019, 3:32 AM
Bharathkannan R
Bharathkannan R - avatar
29 Answers
+ 9
Dictionary = { 'apple': 'An edible fruit ', 'ant': 'A bug that bites' 'another': 'One more' } You can fill in the rest of the words. Good luck
26th Dec 2019, 4:17 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
Thnx rik for your response
26th Dec 2019, 4:17 AM
Bharathkannan R
Bharathkannan R - avatar
+ 3
Thanks for your answer
27th Dec 2019, 8:01 AM
Bharathkannan R
Bharathkannan R - avatar
+ 3
Make dictionary of words and define meanings of that word as value of word and take user input to enter word.
27th Dec 2019, 9:51 AM
Mirza Adeel
Mirza Adeel - avatar
+ 3
If user input is in dictionary then print the values of that word
27th Dec 2019, 9:52 AM
Mirza Adeel
Mirza Adeel - avatar
+ 3
Thanks mirza
27th Dec 2019, 11:18 AM
Bharathkannan R
Bharathkannan R - avatar
+ 3
Example: Take a dictionary name, some variable like Animals={ 'herbivores': 'cow', 'carnivores':'lion', 'omivores':'crow' } First words like herbivores, carnivores, omnivores are called "keys". Second words like cow,lion,crow are called "values". Each key has value. Similarly you can write nested dictionaries.
27th Dec 2019, 1:53 PM
Dolaram
Dolaram - avatar
+ 2
Yes am mean that like as english dictionary of words with their their definitions
26th Dec 2019, 4:04 AM
Bharathkannan R
Bharathkannan R - avatar
+ 2
Ok sir can give some modules sir
26th Dec 2019, 4:07 AM
Bharathkannan R
Bharathkannan R - avatar
26th Dec 2019, 4:09 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
WhyFry thanks, I corrected it, definetly important to mention
26th Dec 2019, 5:39 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 2
Tnx 😅
26th Dec 2019, 6:19 PM
Bharathkannan R
Bharathkannan R - avatar
+ 1
What is it you want exactly ? You mean a list of words and their definitions ?
26th Dec 2019, 4:03 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
bharathkanna well you technically can just write them down one by one... by it would be useless. I would say you use some modules and frameworks, but you're still a beginner, better stick to the basics
26th Dec 2019, 4:06 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
bharathkanna no problem
26th Dec 2019, 4:11 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
WhyFry you mean beautifulsoup ? Also, I don't think a beginner (who also has no experience in web scraping) would be able to do so. But indeed it is the correct way to do it, other than the module I shared
26th Dec 2019, 5:28 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
WhyFry it's not about practice only, one must have strong basics before moving on to other things. In you case, web scraping requires some knowledge of html, which would only be confusing for someone who has just started learning python.
26th Dec 2019, 5:56 AM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 1
Use a database. Just DO NOT write it all out😂
26th Dec 2019, 6:18 PM
Oceanlight
Oceanlight - avatar
+ 1
You can add dictionary using following Syntex i.e., Dictionaryname={element:value, element:value, element:value, element:value, } You can use Single quote ('element') if the element or value is string. You can execute dictionary by using following Syntex i.e., Dictionaryname [element]
28th Dec 2019, 3:38 AM
Ayush Kumar
Ayush Kumar - avatar
0
Do you want to make a program or an app?
26th Dec 2019, 3:16 PM
Eduardo Cavalcante
Eduardo Cavalcante - avatar