osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Code for addition


On 2017-08-05, Ode Idoko via Python-list <python-list at python.org> wrote:
> Can anyone help with the python code that can add 101, 102, 103...2033 please? 
> As I said before, I'm new to python and need assistance in this regard. 
> Thanks for always assisting. 

    $ python
    Python 2.7.12 (default, Jan  3 2017, 10:08:10) 
    [GCC 4.9.4] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> sum(range(101,2034))
    2062511

-- 
Grant Edwards               grant.b.edwards        Yow! Alright, you!!
                                  at               Imitate a WOUNDED SEAL
                              gmail.com            pleading for a PARKING
                                                   SPACE!!