7 kyu
Happy Birthday, Darling!
1,050 of 3,356anter69
Loading description...
Mathematics
Fundamentals
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.
I hated this one.
expected '83? That's just NaN, in base 36!' to equal '83? That's just 21, in base 41!'
Base 41? This is a 7 kyu and I didnt see anything in the instructions that implied we would be going out of the range of the toString() method in JavaScript. What am I missing?
You're not missing anything. Though, there is nothing in the instructions that would imply that the range of inputs would not go out of any range. Actuallty, there is no reason why this should be, katas are ideally languages agnostic tasks, CodeWars exist in many languages and each one has its natural limitations, one must cope with such constraints.
Well there normally are methods in each language, from my little experience, that handle these kinds of number/base conversions. And one expects to be able to use them to solve katas, especially in the 7 kyu ranks. Anyway, Ive coded in the conversions of 20 and 21 from bases 2 to 36, parsed back to decimal number, and see the simple pattern. Makes me think this should be labled as a puzzle.
I think label puzzle is not appropriated here. It's just math and there is no clever trick to find out.
You of course are right. Things just seem more puzzling when you have little experience in them I suppose.
python new test framework
Approved
Very hard for people who know nothing about numeral system', but if you use logic, the solution comes very quickly. I'am newbe in programming but this kata is the best chellenge from all that solved by me
I solved this just looking at the pattern. xD
(JAVASCRIPT) i dont understand what does "For example, if she turns 32, that's exactly 20 - in base 16... Already 39? That's just 21, in base 19!" mean?
I suggest to read the hints... or just skip the kata ;-)
Julia translation
Thanks
This Kata is unnecessarily sexist. The software industry can be very unwelcoming to women. Society has traditionally placed more pressure on women related to age, however a person of any gender can be self conscious about their age.
The Kata author doesn't need to stereotype women/girls like this:
Women (and girls) write code too. We don't need software developers to explain how women need to worry about their age.
Please make this Kata gender neutral with a method name such as "FakeAge" or "AdultsAge" or "ForeverAge"
Women experience too many microagressions on the path to software development. Codewars should encourage and welcome everyone to code.
I am not sure if description is now neutral enough, but I do not see the passage you quoted. Is your issue still valid?
The quote was from the Discourse section. I'm just asking for a method name change.
With 9 translations and ~1700 completions it's a bit too late to change the method name(s), I'm sorry
Lol?! Why is the user 'dlcoe' allowed to write something that stupid and even writing about "agressions" experienced by women (?!?!?!) just because it is unable to correctly understand a text? This makes me feel very uncomfortable (and I am pretty sure I'm not the only one...). Such frustrations should have no place 'on the path to software development'.
I completely agree with the point made here.
While the description no longer contains sexist content, the method name did strike me as very sexist.
This is an amazing kata. It seems like a brain teaser but becomes very simple once you figure out the "trick". Very well done!
Thanks :-)
This comment has been hidden.
Not base 16. In description is base 19. And 39 = 2.19^1 + 1.19^0. So answer is 21
I hae no idea what all of this means. ^ is power? like 2.19**1?
You may need to learn more about number systems (bases or radix) and/or maths in general. The underlying concept is not elementary mathematics, even though the coding part is very basic.
You may start here: https://www.mathsisfun.com/numbers/bases.html or here: https://en.wikipedia.org/wiki/Radix
to solve this kata you just have to observe pattern in tests
That is also a doable approach ;-)
I've manually reiterated it in each base beginning base 5 not knowingly there is a pattern there. Look carefully and don't do the same mistake I've done. argggggggggggg.... why did I not see that!
C# actual and expected are reversed.
Fixed
Java translation
Thanks!
C Translation kumited
Thanks!
this is a brilliant question i cracked code in my 2nd attempt but it i think its more of 7kyu
Ranking cannot be changed anymore (if you were suggesting that)
It is a 7kyu
This comment has been hidden.
This post gave me the solution.
How to understand "39? That's just 21, in base 19!"?
This comment has been hidden.
@anter69, that didn't help at all. Can you tell me how they get 21 from 39 using this "base 16" (according to wikipedia base 16 is 42, numbers from 0-9 + letters in alphabet). 42-39 is 3, multiplying will only make it go higher so really, hot to get 21 with 39 and 42?
You may need to learn more about number systems (bases or radix) and/or maths in general. The underlying concept is not elementary mathematics, even though the coding part is very basic.
you may start here: https://www.mathsisfun.com/numbers/bases.html
Elixir translation awaiting approval.
Thanks!
just to ask can someone just explain this "For example, if she turns 32, that's exactly 20 - in base 16... Already 39? That's just 21, in base 19!"
Look up (or calculate) 32 in number system 16. (hint: try
hex(32)
)C++ translation. Please, review and approve.
Thanks!
Haskell translation
Thanks!
This is probably my favorite beginner kata. Excellent idea.
Thanks :-)
You can suprise your partner - or any female friend/acquaintance - on her next birthday!
approved to 7 because even if the solution is quite simple, the knowledge needed to get there isn't worth of 8 kyu. And if it still wasn't approved yet, while having those stats, I guess no PU wanted to approve it at 8.
@anter: you too, you should reconsidere your way of ranking, if you believed this was 8...
cheers
Well, coding-wise it's very simple. The underlying mathematical concept is more complex, that's true.
Thanks for approving :-)
Well, I was planning on approving it today, but when I woke up, it was already approved x)
If
return a * b
is an8
, very little should be an8
..It sometimes seems we would have wanted
9 kyu
to exist, instead of just ranking everything one higher than our first instinct.Pfff.... you're, AGAIN, not making the difference between the implementation and the way to get there.
Solving a kata is NOT only to write the implementation, it's to find the way to get there too. Generally. Here you have to find your way first. So not 8 kyu, no.
I feel more and more like the ranking is a lost cause, here.
"It sometimes seems" like you (and you're not alone) forgot what 8 kyus are supposed to be...
Why? You could lower it down to at least 4.
Mathematically true, yes. But this is about women; and below 20 they are rather just girls. And girls don't really mind or care that much about their age ;-)