[Tutor] sum() function
Olsen, Avalow Y
Yuanyuan.A.Olsen at HealthPartners.Com
Mon Nov 23 18:38:46 EST 2020
Hi everyone,
I am trying to sum up the integer numbers in a list like this:
numbers = [1,2,3, 4,5,1,4,5]
total = sum(numbers)
print(total)
_______________________________________________
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-094ed0d3ab6c> in <module>
4 numbers = [1,2,3,4,5,1,4,5]
5
----> 6 total = sum(numbers)
7 print(total)
8
TypeError: 'int' object is not callable
Don't understand why it doesn't work. I am using Anaconda Jupyter Notebook Python 3
Please help.
Thank you for your help in advance!
Ava
________________________________
This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient or the individual responsible for delivering the e-mail to the intended recipient, please be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.
If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender. Disclaimer R001.0
More information about the Tutor
mailing list