question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error of right option in data analysis with python course

See original GitHub issue

Affected page Add a link to the coding challenge with the problem. https://www.freecodecamp.org/learn/data-analysis-with-python/data-analysis-with-python-course/numpy-operations

Your code Copy and paste the code from the editor that you used in between the back-ticks below:

a = np.arange(5)
a + 20


above problem showing right answer as [0, 1, 2, 3, 4] 

**BUT**



Expected behavior Add a clear and concise description of what you expected to happen.

The right answer should be == [20, 21, 22, 24, 24]

Screenshots If applicable, add screenshots to help explain your problem. you can drag and drop, png, jpg, gif, etc. in this box. image

System (please complete the following information):

  • Device: Desktop
  • OS: Windows 10
  • Browser: Chrome
  • Version: Version 90.0.4430.212

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nitishjoshi86commented, May 19, 2021

ok understood, was confused. Thanks.

0reactions
Nirajn2311commented, May 19, 2021

I understand. Ok, think what the last line ie. a+20 is doing. Again, I’m saying we’re asking the VALUE of a.

Read more comments on GitHub >

github_iconTop Results From Across the Web

30. Errors and Exception Handling | Python Tutorial
An exception is an error that happens during the execution of a program. Exceptions are known to non-programmers as instances that do not ......
Read more >
Data Analysis with Python | Coursera
This course will take you from the basics of data analysis with Python to building and evaluating data models. Topics covered include: -...
Read more >
Data Analysis with Python for Excel Users - Full Course
Learn how to use Python and Pandas for data analysis. This course will be especially helpful if you have experience with Excel, ...
Read more >
DataCamp isn't accepting my answer – Support
The fastest way to figure out why your code is not being accepted by DataCamp is to view the exercise's hint and solution....
Read more >
Python for Data Analysis
Python programmers engaged in such work. Key projects for data analysis (especially. NumPy, IPython, matplotlib, and pandas) had also matured enough that a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found