Re: Functions help

2014-03-01 Thread Grant Edwards
On 2014-02-24, Benjamin Kaplan wrote: > On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: >> On 24/02/2014 11:09 AM, Mark Lawrence wrote: >>> >>> On 24/02/2014 00:55, alex23 wrote: for _ in range(5): func() >>> >>> >>> the obvious indentation error above >> >> >> Stupid

Re: Functions help

2014-03-01 Thread Roy Smith
In article , Mark Lawrence wrote: > On 24/02/2014 00:55, alex23 wrote: > > On 23/02/2014 3:43 PM, Scott W Dunning wrote: > >> I had a question regarding functions. Is there a way to call a > >> function multiple times without recalling it over and over. Meaning > >> is there a way I can call a

Re: Functions help

2014-02-27 Thread Rhodri James
On Tue, 25 Feb 2014 02:18:43 -, Dennis Lee Bieber wrote: On Mon, 24 Feb 2014 01:01:15 -, "Rhodri James" declaimed the following: The function "range" returns the sequence of numbers 1, 2, 3, 4 and 5 [*], so this has the same effect as if you had typed: Wrong -- it

Re: Functions help

2014-02-26 Thread rurpy
On 02/25/2014 07:52 PM, Ethan Furman wrote: > On 02/23/2014 08:01 PM, ru...@yahoo.com wrote: >> On 02/23/2014 08:21 PM, Mark Lawrence wrote: >>> On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: > On 24/02/2014 11:09 AM, Mark Lawrence wrote: >>

Re: Functions help

2014-02-26 Thread Mark Lawrence
On 26/02/2014 02:06, Cameron Simpson wrote: On 24Feb2014 13:59, Mark Lawrence wrote: On 24/02/2014 04:01, ru...@yahoo.com wrote: On 02/23/2014 08:21 PM, Mark Lawrence wrote: On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: On 24/02/2014 11:09 AM, M

Re: Functions help

2014-02-25 Thread Ethan Furman
On 02/23/2014 08:01 PM, ru...@yahoo.com wrote: On 02/23/2014 08:21 PM, Mark Lawrence wrote: On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5):

Re: Functions help

2014-02-25 Thread Cameron Simpson
On 23Feb2014 18:55, Benjamin Kaplan wrote: > On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: > > On 24/02/2014 11:09 AM, Mark Lawrence wrote: > >> On 24/02/2014 00:55, alex23 wrote: > >>> for _ in range(5): > >>> func() > >> > >> the obvious indentation error above > > > > Stupid cut&pas

Re: Functions help

2014-02-25 Thread Cameron Simpson
On 24Feb2014 13:59, Mark Lawrence wrote: > On 24/02/2014 04:01, ru...@yahoo.com wrote: > >On 02/23/2014 08:21 PM, Mark Lawrence wrote: > >>On 24/02/2014 02:55, Benjamin Kaplan wrote: > >>>On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: > On 24/02/2014 11:09 AM, Mark Lawrence wrote: > >On 2

Re: Functions help

2014-02-24 Thread Jean-Michel Pichavant
- Original Message - > On Feb 23, 2014, at 1:44 AM, Steven D'Aprano < > steve+comp.lang.pyt...@pearwood.info > wrote: > > Sorry, I don't really understand your question. Could you show an > > example > > > of what you are doing? > > > Do you mean "add 5" or "*5"? "Add *5 doesn't really

Re: Functions help

2014-02-24 Thread Mark Lawrence
On 24/02/2014 04:01, ru...@yahoo.com wrote: On 02/23/2014 08:21 PM, Mark Lawrence wrote: On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5):

Re: Functions help

2014-02-24 Thread sffjunkie
On Sunday, 23 February 2014 05:43:17 UTC, Scott W Dunning wrote: > I had a question regarding functions. Is there a way to call a function > multiple times without recalling it over and over. Meaning is there a way I > can call a function and then add *5 or something like that? The followin

Re: Functions help

2014-02-24 Thread sffjunkie
On Sunday, 23 February 2014 05:43:17 UTC, Scott W Dunning wrote: > I had a question regarding functions. Is there a way to call a function > multiple times without recalling it over and over. Meaning is there a way I > can call a function and then add *5 or something like that? > The followi

Re: Functions help

2014-02-23 Thread rurpy
On 02/23/2014 08:21 PM, Mark Lawrence wrote: > On 24/02/2014 02:55, Benjamin Kaplan wrote: >> On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: >>> On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: > for _ in range(5): > func() the obvious i

Re: Functions help

2014-02-23 Thread MRAB
On 2014-02-24 03:21, Mark Lawrence wrote: On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5): func() the obvious indentation error above

Re: Functions help

2014-02-23 Thread Mark Lawrence
On 24/02/2014 02:55, Benjamin Kaplan wrote: On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5): func() the obvious indentation error above Stupid cut&paste :( -- Your message c

Re: Functions help

2014-02-23 Thread Benjamin Kaplan
On Sun, Feb 23, 2014 at 5:39 PM, alex23 wrote: > On 24/02/2014 11:09 AM, Mark Lawrence wrote: >> >> On 24/02/2014 00:55, alex23 wrote: >>> >>> >>> for _ in range(5): >>> func() >> >> >> the obvious indentation error above > > > Stupid cut&paste :( > -- Your message came through fine for

Re: Functions help

2014-02-23 Thread Scott W Dunning
I understood what you meant because I looked up loops in the python documentation since we haven’t got there yet in school. On Feb 23, 2014, at 6:39 PM, alex23 wrote: > On 24/02/2014 11:09 AM, Mark Lawrence wrote: >> On 24/02/2014 00:55, alex23 wrote: >>> >>> for _ in range(5): >>> f

Re: Functions help

2014-02-23 Thread Scott W Dunning
On Feb 23, 2014, at 12:59 AM, Ben Finney wrote: > > You should ask question like this on the “python-tutor” forum. Thanks Ben, I wasn’t aware of PythonTutor. -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-23 Thread alex23
On 24/02/2014 11:09 AM, Mark Lawrence wrote: On 24/02/2014 00:55, alex23 wrote: for _ in range(5): func() the obvious indentation error above Stupid cut&paste :( -- https://mail.python.org/mailman/listinfo/python-list

Re: Functions help

2014-02-23 Thread Travis Griggs
> On Feb 23, 2014, at 17:09, Mark Lawrence wrote: > > For the benefit of newbies, besides the obvious indentation error above, the > underscore basically acts as a dummy variable. I'll let the language lawyers > give a very detailed, precise description :) You mean a dummy name binding, rig

Re: Functions help

2014-02-23 Thread Scott W Dunning
On Feb 23, 2014, at 1:44 AM, Steven D'Aprano wrote: > > Sorry, I don't really understand your question. Could you show an example > of what you are doing? > > Do you mean "add 5" or "*5"? "Add *5 doesn't really mean anything to me. Sorry I forgot to add the code that I had to give an example

Re: Functions help

2014-02-23 Thread Mark Lawrence
On 24/02/2014 00:55, alex23 wrote: On 23/02/2014 3:43 PM, Scott W Dunning wrote: I had a question regarding functions. Is there a way to call a function multiple times without recalling it over and over. Meaning is there a way I can call a function and then add *5 or something like that? The

Re: Functions help

2014-02-23 Thread Rhodri James
On Sun, 23 Feb 2014 05:43:17 -, Scott W Dunning wrote: I had a question regarding functions. Is there a way to call a function multiple times without recalling it over and over. Meaning is there a way I can call a function and then add *5 or something like that? The usual way to ca

Re: Functions help

2014-02-23 Thread alex23
On 23/02/2014 3:43 PM, Scott W Dunning wrote: I had a question regarding functions. Is there a way to call a function multiple times without recalling it over and over. Meaning is there a way I can call a function and then add *5 or something like that? The same way you repeat anything in P

Re: Functions help

2014-02-23 Thread Steven D'Aprano
On Sat, 22 Feb 2014 22:43:17 -0700, Scott W Dunning wrote: > Hello, > > I had a question regarding functions. Is there a way to call a function > multiple times without recalling it over and over. Meaning is there a > way I can call a function and then add *5 or something like that? Sorry, I

Re: Functions help

2014-02-23 Thread Ben Finney
Scott W Dunning writes: > I had a question regarding functions. Is there a way to call a > function multiple times without recalling it over and over. You should ask question like this on the “python-tutor” forum. I say that because this question suggests you have yet to learn about basic Pytho