6 kyu
The 5 Love Languages
998 of 1,249anter69
Loading description...
Machine Learning
Algorithms
Data Science
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
Actually, quite a clear and intuitive kata to figure out and to solve.
thanks
You're very welcome.
This comment has been hidden.
This comment has been hidden.
From the description:
Your code includes a nested loop, thus asking for response
n * 7 * 5
times in total, which is greater than the allowedn * 7
.ps: next time please mark your comment as a
question
, as this is not a kataissue
(1000+ people solved the kata and no sign of such problem in the comments).This comment has been hidden.
You can approach it in different ways, but the constraints are clear: determine the most probable language using maximum
n * 7
tries.I updated the sample tests in python to stop when the maximum number of tries is reached. Haskell and JS should be reviewed by the translators.
Cheers
This comment has been hidden.
It seems that the author's intention was to block the package
inspect
, but this indirectly blocked other packages, includingnumpy
andpandas
. Or at least this is what I think happened.However, I tried to run your solution with unblocked packages and it still returned a wrong answer (it keeps returning
"words"
repeatedly, for any input), but I do not know why.Ah, thank you! I had not yet got to testing it yet, but was struggling!! I'll have a go on Jupyter.
This comment has been hidden.
I don't understand how you solve em, can someone please tell me the general strategy to go about solving it? I am not smart enough to manage this problem.
In that case this kata is not for you ;-) Bookmark it, complete a few (hundred) more katas, and then try again.
Cheers
i been at it for hours i just need some directions
Instructions are very confusing. I figured it out, somehow, but the part in the details that say You have n * 7 tries (= n weeks) really lost me. I thought that meant you can try each "language" 7 times per week, once per day, but apparently not.
Updated the description to be hopefully clearer:
I don't undersatand what to do in this kata? Please explain or give me any clue to understand it.
"find the main love language of your partner!"
You can call
response
forn
weeks. Then you have to return what you think is your partner's main love language.Yeah, seriously, this problem's instructions do not make sense, and seem to be leaving out some information. Skip....
Updated the description to be hopefully clearer:
WUT?!
I republished; that seems to have fixed it.
Possibly ( wildly speculative ) the approval ran the example solution, and it failed ( that time ).
If anybody can confirm or deny that, please do.
Haskell translation
Thanks, approved
JavaScript translation
Thanks!
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Mmmmh... I'm not fond of this, because you have the exact same behavior: calling too many times the partner method, the user's code will raise an exception that he can hanlde on his side (and he will!). So actually, you still have the very same problem. I believe my suggestion is really the better way to handle this.
EDIT: errr... I didn't notice what you printed in the message. I guess that will actually do the same?
Yes, it gives an error message in the output window. And as the class gets deleted, you get another error message and the execution stops. Just try it yourself ;-)
https://www.codewars.com/kata/reviews/5aa7b6f7824580e13e009290/groups/5aa86051e14140921d0088b0
Is this plainly visible/accessible to the target user group (6-7 kyu) without solving the kata first? If yes, any suggestions how to fix it? If not, then does it really matter? :-)
This comment has been hidden.
Thanks for the explanation. Any suggestion how to hide those details?
This comment has been hidden.
Fixed.
Thanks for the help,
@Blind4Basics
!