a. Make a function longest[lang_]
that gives the length of the longest word in the dictionary of lang. You should get longest["French"]=25
For this part, I have lang = DictionaryLookup[All];
longest[lang_] := Max[StringLength[lang]]
But this isn't working.
b. Now give a list with entries {language,longest[language]}
.
Table[{lang[[i]], Length[DictionaryLookup[{lang[[i]], All}]]}, {i, 1,
Length[lang]}]
Again not working
c. Make a function lonegestwords[lang_]
that gives the output {longest[lang],lang,longwords}
where longwords
is the list of the words of longest length in lang.
I tried longestwords[lang_] := {longest[lang], lang, Select[DictionaryLookup[{lang, All}], StringLength[#] == longest[lang] &]}
d. Now get the list with entries longestwords[lang]
for all languages and sort it in descending order by the longest word.
I know that I have to use Sort[longestwords[lang],#2[[1]]<#1[[1]]&]
But since I don't have the function, I can't do it.