-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question 39 solution isn't quite right #209
Comments
Let me know if I should create a PR. |
I've been silly. The question asks for size 10, and the code I provided produces an array of size 11.
|
Closed
Thanks for your analysis. I think the current answer is correct given the question. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The given solution to the question:
Is the following code:
However, this is slightly wrong. We are asked to produce a range of values, from 0-1, and exclude 0 and 1 themselves. The provided code, however, generates a list of values ranging from 0, to 0.90909091.
The value of Z, before we slice with [1:], is:
Instead, the code should be:
Which produces Z with these values prior to slicing with [1:-1]:
[0. 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]
This is a bit of a nitpick, and I may be missing something, I just thought I saw a small way to contribute to this project and went for it.
The text was updated successfully, but these errors were encountered: