Draft
Get the Mean
124 of 168AseelM
Loading description...
Fundamentals
Statistics
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.
Duplicate of a bunch of "average" and "mean" katas, e.g. https://www.codewars.com/kata/calculate-average/ https://www.codewars.com/kata/average-scores/ https://www.codewars.com/kata/get-the-mean-of-an-array/ etc.
Since the description is explicit about rounding ("…calculates the mean of a series of numbers(to 2 decimal places"), that test cases should be as well.
However, at least for the Ruby version the tests expect more decimal places and fail in case the given result is rounded as the description describes.
Hi :) the Ruby translation was done by @bestwebua so I hope he fixes that!
But thanks for the feedback...
Hola! I just fixed it. Check out please!
Thanx a mill!
I confused, but anybody know how to check matching the type of object on Codewars Ruby Test Cases? For instance I have some code:
This test is equal
calculateMean(*arr) result == validator(*arr) result
.How to do test case like .equal? method
[calculateMean(*arr) result].equal?([validator(*arr) result])
. It's can fix test cases for this kata. It is necessary to use2.0.equal?(2) => false
instead2.0 == 2 => true
. Thank you very much for your help :)Hi, Aseel! I just kumited Ruby translation. Bear hugs :)
Thank you! just joined this month (and started coding for the first time as well), so I am just picking up on the features in CW, so thank you for translating it and I will check the Kumite!
You're welcome, Aseel! Happy coding ;)
Hi bestwebua, please can you either fix the kata or delete the translation :) thanx in advance!
Fixed!
Perfect :)
Brilliant)
Your Kata needs more extensive test coverage to prevent easy cheap-cheat solutions and/or logically flawed solutions. The most common way to increase test coverage is through the inclusion of randomly generated test cases at runtime so please add these. The lack of test coverage in a Kata as an Issue is recognised as an official CW stance.
thanks for your feedback, done :)
Much better, many thanks for taking the time to add random assertions :D
Thank you, cause I just started coding 3 weeks ago, for the first time ever, so I appreciate all the feedback I wasn't even aware of random tests! I have just published a slightly better one taking on board all the issues with this one, if you can take a look at it and give me feedback I would highly appreciate it!
Wrong initial solution (function/name), ... and it's a duplicate: https://www.codewars.com/kata/search/my-languages?q=mean
Many thanks for pointing out this Issue @smile67 :D @AseelM you may want to unpublish this Kata and rework it to make it more unique before publishing it again as this Kata will never make it out of Beta in its current state.
thank so much for the flaging it up, I was toying with two ideas that lead to the discrepancies in the names when it was published :)