These are chat archives for Codewars/codewars.com/kata-solving-help

25th
Nov 2017
Bubbler-4
@Bubbler-4
Nov 25 2017 00:28
Sorry, both are big spoilers :P
Bubbler-4
@Bubbler-4
Nov 25 2017 00:49
What I can say is, the PE problem is not very hard(bruteforce solvable) and you can see y
the keyword in the comment section
Arătar3
@L4MD4PHX
Nov 25 2017 03:47
Hello
@docgunthrop
Fernando Balandran
@kodaman2
Nov 25 2017 03:51
What exactly do you need help with? Where are you getting stuck?
Arătar3
@L4MD4PHX
Nov 25 2017 03:52
the part where I have to rearrange the words in the string
I'm not sure how to check and rearrange them
are you able to help me out? @fredz0003
Fernando Balandran
@kodaman2
Nov 25 2017 03:56
Yeah just not sure how much to tell you lol. The checking is pretty straightforward, do you have any code so far?
Arătar3
@L4MD4PHX
Nov 25 2017 03:59
other than checking the empty strings I don't have much code as I'm not sure how to proceed. I'm still new to python
@fredz0003
EK
@docgunthrop
Nov 25 2017 04:02
@L4MD4PHX sorry, my Python is rusty
Fernando Balandran
@kodaman2
Nov 25 2017 04:03
Ok look for checking, I would "split" the whole string into substring. Then do the checking with a "forloop", when you find 1...9 "in" substring append it to a new list. At the end "join" to return the ordered string. (Note quoted words are clues)
EK
@docgunthrop
Nov 25 2017 04:03
but looking at the kata, it seems pretty straightforward
Fernando Balandran
@kodaman2
Nov 25 2017 04:03
If this sounds a bit too hard, you might wanna start with 8, 7kyu
EK
@docgunthrop
Nov 25 2017 04:04
like @fredz0003 mentioned, the first step could be to split the string into separate words
since the numbers are only from 1 to 9, you can do a basic sort
check each word for a number, then sort accordingly
or instead of sorting, you can just assign each word to an array (list in python) index position based on the number inside the word
then join the list into one string
Voile
@Voileexperiments
Nov 25 2017 04:17
people always fail at that kata at the same spot
then post the same bogus issue about it
which their mistake becomes obvious if you just log the results each step
but of course they wouldn't, if they did this wouldn't be CodeWars
Fernando Balandran
@kodaman2
Nov 25 2017 04:23
Breaking down a problem into steps is a skill in itself though. But I agree printing, debugging, testing, are underrated tools.
EK
@docgunthrop
Nov 25 2017 04:44
regex knowledge is probably the weak spot for a lot of beginners
Voile
@Voileexperiments
Nov 25 2017 04:44
I used to be pretty bad at regex too
but you gotta pick it up if you want to actually know about it