The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Learning Python Programming – Everything You Should Know

Learning Python Programming – Everything You Should Know

1
Vote
2
Answer

Numbers = [1, 5, 64, 24.5]
sum(Numbers)
showing error-

NameError                                 Traceback (most recent call last)
<ipython-input-13-a8c02ab2727d> in <module>
----> 1 sum(Numbers)

NameError: name 'Numbers' is not defined

please explain, i did everything exactly same yet there is an error

thank you!
2 Answers

365 Team
0
Votes

Hi Prafful, 
I copied your example and it runs fine on my computer. Could you maybe try restarting the kernel and then running it again?
Best, 
Eli

365 Team
0
Votes

Hi Prafful!
If you’ve set the two commands to be separate, like this:

Numbers = [1, 5, 64, 24.5]

and then you have

sum(Numbers)

in a separate code cell, please make sure to execute both of them in this order, from top to bottom.
Hope this helps.
Best,
Martin