Re: [Tutor] Adding consecutive numbers

2015-04-27 Thread Steven D'Aprano
Hi, and welcome! My answers are below. On Mon, Apr 27, 2015 at 08:37:54PM +1000, Whom Isac wrote: > Hi, I am trying to build a python mini program to solve a math problem . I > wanted my program to ask two number from the operator and it can add those > number as a integer but as consecutive numb

Re: [Tutor] Adding consecutive numbers

2015-04-27 Thread Mark Lawrence
On 27/04/2015 13:41, Dave Angel wrote: On 04/27/2015 06:37 AM, Whom Isac wrote: But if you really have to do the sum, then you need to build a list, and sum it. That's not very hard either, since range() returns a list, and the sum() function is built-in. range() only returns a list in Pytho

Re: [Tutor] Adding consecutive numbers

2015-04-27 Thread Dave Angel
On 04/27/2015 06:37 AM, Whom Isac wrote: Hi, I am trying to build a python mini program to solve a math problem . I wanted my program to ask two number from the operator and it can add those number as a integer but as consecutive number in range. For example, if num1 entry =1 & num2 entry = 100 ,

Re: [Tutor] Adding consecutive numbers

2015-04-27 Thread Alan Gauld
On 27/04/15 11:37, Whom Isac wrote: num1 entry =1 & num2 entry = 100 , the program should be adding number from 1 to 100 together(which should equal to 5050). I have uploaded my code file below. Infortunately we can't see it. Since it is presumably quite short please just send it in the bod

[Tutor] Adding consecutive numbers

2015-04-27 Thread Whom Isac
Hi, I am trying to build a python mini program to solve a math problem . I wanted my program to ask two number from the operator and it can add those number as a integer but as consecutive number in range. For example, if num1 entry =1 & num2 entry = 100 , the program should be adding number from 1