8 kyu
NBA full 48 minutes average
5,411 of 10,494EricDalrymple91
Loading description...
Fundamentals
Mathematics
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.
Please leave an instruction on how to calculate the extrapolation in basketball. Some people do not know much about basketball.
assert_approx_equal
or equivalent DELTA comparison should be enforced in all languagesDescription should be language-agnostic
This comment has been hidden.
I think points should be rounded/flored, but ok. xD
Should specify that if the output is a float, it should be rounded to 1 decimal place.
It's already there.
Oooh, so that's what it meant. I guess "rounded to 1 decimal place" is easier to understand.
This comment has been hidden.
This comment has been hidden.
No, find what he scores per minute and then muliply by the full game length.
All tests passed except 21.1, i got 21.2 after JS rounding.
This isn't fair.
If it's a static test just hardcode it. If it's a random one then just re-submit
From basic tests I found out it should cut off all decimal places after hundredths, and only after do the rounding.
This comment has been hidden.
Ruby translation kumited :) Please check and approve ~~
if you remove the word "extrapolate" from the description, the task becomes much easier. if this confuses you, then just think that you can distribute points evenly throughout the player's time, and then you will guess.
Absolutely true, I was searching for linear extrapolation furmula, before I took a look here.
R Translation added. Please review and take care :).
stupid challenge couldn't do rounding to finish. used different methods and discovered :>>
src/Solution.cs(12,20): error CS0103: The name 'Double' does not exist in the current context
something like this. tryed different methods that also don't work. if it is not bugged and challenge it is real then it could be written in description.
Not an issue. Your code is the cause of the error.
solved it turned out i needed 'Using'... kingda imports
The zero case test is only in 'sample' testing: test.assert_equals(nba_extrap(0, 0), 0) I think it should be in the final testing too.
This comment has been hidden.
I gave an error "Math. "... supposedly does not exist in this context.
"src/Solution.cs(9,12): error CS0103: The name 'Math' does not exist in the current context"
Nise....
If you're using C# make sure you have added your using statement for System;
This comment has been hidden.
Beware of floating point vs. integer division ;-)
Check the python language version ;-)
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
I've just refreshed the kata so all Python language version should be enabled ;-)
Python 2 will perform floating point division if either the divisor or divident is floating point. Constants are floating point if you include a decimal point. 4 is an int. 4.0 a float. Or you could cast an int variable to float with a float().
I think that there should to be a Wilt Chamberlain exception - average 48,52 mpg in 61/62 season ;p
Hey all, I couldn't understand the problem statement as I have never heard or watched NBA games. Would be great if someone helps !
Hello,
the first number says how many points someone scores in the game. The second number says how long a player was in the game.
The task is to find out: If the player would be the whole time in the game (48 minutes) and has the same scorerate how many points would he make.
I hope my answer makes the task for you clearer.
Thank you kind sir for this explaination!
Hi, I made a C# translation, please review and approve.
Translated to Javascript and CoffeeScript. Please accept.
Make it compatible with Python 3.4. As your tests are already compatible with Python 3.4, you simply need to select this Python version in kata editor, validates your solution and publishes it again.
Roger that, gold leader!
I validated Python 3.4, but for some reason when it won't let me publish those results. I think that it publishes and then I still can't select 3.4 in the kata. Any ideas?
Are all your tests green in Python 3.4? When you publish, is there an error message at the top of the page? If not, you can have to hit publish another time after validating. Try to make a small change(adding a blank character), then publish in case that CW checks for editions before publishing.
Yea! It says all the test pass and then just doesn't quite equate for some reason.
No error at the top? Then try to make a small change and check with revisions if your edits are published
Hello, circling back on this issue. I am still unsure why it would say all my tests validate and then won't let me publish. Any other suggestions?
Two weeks ago, there were bugs when publishing. Again, look the red message at the top of the page when publishing - it should have changed. It's unlikely that the current validator yields two different results in Python 2 & 3. Are both your solution and validator identical? Don't forget to validate the tests with both Python 2 & 3. When publising, CW launchs the validator and if it's all green without any error at the top, it reloads the page posting your edits at this very moment. Then open Revisions screen in another tab and check if your edits are present. You might have to click
Publish
a second time after trying to publish once (it happened CW doesn't automatically launch the publishing process).Done
This comment has been hidden.
Make sure you have your rounding down!
Thank you for help!
No problem my good sir.