Freecodecamp: Data Analysis with Python Course - Numpy Operations - incorrect answer

Created on 30 May 2020  路  6Comments  路  Source: freeCodeCamp/freeCodeCamp

Describe your problem and how to reproduce it:
None of the available answers are correct. Without the 5 second option (marked as solution) would have the right numbers.

What is the value of a after you run the following code?:

a = np.arange(5)
a + 20

Answers

[20, 21, 22, 24, 24]
[0, 1, 2, 3, 4, 5]
[25, 26, 27, 28, 29]

Add a Link to the page with the problem:
https://www.freecodecamp.dev/learn/data-analysis-with-python/data-analysis-with-python-course/numpy-operations

help wanted learn

All 6 comments

Confirmed. Thank you, for pointing this out. For whoever submits a PR for this, only the second answer option needs to be changed to:

[0, 1, 2, 3, 4]

Thanks for catching this @sanityto. Please feel free to report any other issues you find and submit PRs to fix them if you're able to.

@scissorsneedfoodtoo I want to work on this

@scissorsneedfoodtoo I think the answer is also wrong. It should be option 1? Please do confirm me on this.

@niteshseram, thanks for fixing this problem and helping us improve the curriculum! Also, congratulations on your first open source contribution. Looking forward to your next PR :+1: :+1:

@scissorsneedfoodtoo Thanks. Surely, I am looking forward to contribute more.

Was this page helpful?
0 / 5 - 0 ratings