0

Working of a piece of code, a bit of help please? (solved)

HI, this is the link to my code: https://code.sololearn.com/ca18A2a14A17 I am slightly stuck on something, and the information is on a note titles 'FOR DISCUSSION PROBLEM'. There is quite a lot to read, and maybe a bit to take in, so please only do this if you are determined to! EDIT: I have now finished the problem, but you are free to see the code, and see what my question was in the code link above. Feel free to download your own dictionary, name it dictionary.txt, and use this code! Thanks!

13th Mar 2021, 11:51 AM
Kamil Hamid
Kamil Hamid - avatar
3 odpowiedzi
+ 1
So you should be using range from 0,6 for 6 characters 0,7 will obviously give error as there is no character at 6th index. And what i did is to add a list to which all the comboWords are appended and then wrote that list as a comma seperated string to file . Then read the string from file , split it and checked for a particular combo word. https://code.sololearn.com/c1Qc3i3U2y21/?ref=app Can't provide any feedback on your code though.
13th Mar 2021, 12:43 PM
Abhay
Abhay - avatar
0
how your code would understand if the generated words are correct English words? for example, lets say the input is h o s m e r u what determines your code to output correct words from given input such as home house horse ect... coz actually it will generate all possible letters combinations but without checking if its correct English word or not. hope you got my point. but if you only need all possible letters combinations go to https://stackoverflow.com/questions/27263155/JUMP_LINK__&&__python__&&__JUMP_LINK-find-all-possible-word-combinations-with-a-sequence-of-characters-word#27263553
13th Mar 2021, 9:54 PM
iTech
iTech - avatar
0
Thanks for the link iTech. I would just like to mention that I have used an if wordCombo in dictionary: command, so it can recognise if it is a valid word.
14th Mar 2021, 1:22 PM
Kamil Hamid
Kamil Hamid - avatar