Re: Code for addition

2017-08-07 Thread Marko Rauhamaa
Neil Cerutti : > On 2017-08-05, Ode Idoko via Python-list > 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. > (2033 - 101 + 1) * (101 + 2033) /

Re: Code for addition

2017-08-07 Thread Neil Cerutti
On 2017-08-05, Ode Idoko via Python-list 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. >>> (2033 - 101 + 1) * (101 + 2033) / 2 You could also calcul

Re: Code for addition

2017-08-07 Thread Grant Edwards
On 2017-08-05, Ode Idoko via Python-list 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:

Re: Code for addition

2017-08-04 Thread Rustom Mody
On Saturday, August 5, 2017 at 6:55:09 AM UTC+5:30, Steve D'Aprano wrote: > On Sat, 5 Aug 2017 12:43 pm, Ode Idoko wrote: > > > Can anyone help with the python code that can add 101, 102, 103...2033 > > please? > > > Sounds like homework. Here are some hints for you to play around with and see

Re: Code for addition

2017-08-04 Thread Steve D'Aprano
On Sat, 5 Aug 2017 12:43 pm, Ode Idoko wrote: > Can anyone help with the python code that can add 101, 102, 103...2033 please? Sounds like homework. Here are some hints for you to play around with and see if you can get the right answer: sum([101, 102, 103]) range(101, 104) sum(range(1, 4))

Re: Code for addition

2017-08-04 Thread Bob Gailer
On Aug 4, 2017 5:27 PM, "Ode Idoko via Python-list" wrote: > > Can anyone help with the python code that can add 101, 102, 103...2033 please? We are here to help but we don't have crystal balls to interpret your request. The best thing you can do is show us what attempts you have made to write c

Code for addition

2017-08-04 Thread Ode Idoko via Python-list
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. Sent from my iPhone -- https://mail.python.org/mailman/listinfo/python-list