Re: [Tutor] eazy python question involving functions and parameters

2009-09-21 Thread Alan Gauld
And to remove all doubt wesley chun wrote: again, the easiest way to differentiate b/w the 2 is whether or not it results in some Python object. if it doesn, it's an expression; if not, it's a statement. Should say ... if it does, it's an expression You'll find my explanation of expre

Re: [Tutor] eazy python question involving functions and parameters

2009-09-21 Thread wesley chun
>> an expression is something ... that evaluates to *some* Python object >>: >> in contrast, a statement is something that has no intrinsic value > >               Umm.you just completely confused me. What does it do? ok, now *i*'m the one confused... what does *what* do? both expression

[Tutor] eazy python question involving functions and parameters

2009-09-21 Thread Corey Richardson
another thing from the OP that no one has addressed yet is what *this* means: >/ > Write an expression (not a statement!) / to the veterans, we don't have to think twice, but this may not be obvious to a beginner. basically, an expression is something like 4 * 5, foo(), [x for x in range(5)], et

Re: [Tutor] eazy python question involving functions and parameters

2009-09-21 Thread Ken Oliver
-Original Message- >From: wesley chun >Sent: Sep 21, 2009 4:49 AM >To: tutor@python.org >Subject: Re: [Tutor] eazy python question involving functions and parameters > >>> Just think: 4 players left means that this is the semi final. >> >> What a bril

Re: [Tutor] eazy python question involving functions and parameters

2009-09-21 Thread wesley chun
>> Just think: 4 players left means that this is the semi final. > > What a brilliant answer! It tells him how to do it if he just stops and > thinks but gives nothing away. I love it. :-) i agree with alan on this. in fact, i can just picture the brackets in my head already. :-) another thing f

Re: [Tutor] eazy python question involving functions and, parameters

2009-09-20 Thread Corey Richardson
assume that jade2 is a function that expects two int parameters and returns the value of the larger one. Also assume that four variables, population1 , population2 , population3 , and population4 have already been defined and associated with int values. Write an expre

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Alan Gauld
Just think: 4 players left means that this is the semi final. What a brilliant answer! It tells him how to do it if he just stops and thinks but gives nothing away. I love it. :-) Alan G. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Benno Lang
On Mon, Sep 21, 2009 at 5:19 AM, daggerdvm wrote: > > assume that  jade2 is a function that expects two  int parameters and returns > the value of the larger one. > > Also assume that four variables,  population1 ,  population2 ,  population3 > , and  population4 have already been defined and asso

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Steve Willoughby
On Sun, Sep 20, 2009 at 01:19:08PM -0700, daggerdvm wrote: > assume that jade2 is a function that expects two int parameters and returns > the value of the larger one. This really smells like a school assignment, which as a general policy we don't solve for you. But as a hint in the right dire

[Tutor] eazy python question involving functions and parameters

2009-09-20 Thread daggerdvm
assume that jade2 is a function that expects two int parameters and returns the value of the larger one. Also assume that four variables, population1 , population2 , population3 , and population4 have already been defined and associated with int values. Write an expression (not a statem