Re: [Tutor] Where do I start learning Python

2013-09-10 Thread Jugurtha Hadjar
On 09/08/2013 09:00 PM, olatunde Adebayo wrote: hey everyone, I am taking a graduate level class this fall that required python programming. can anyone direct me to where can i get a free python training crash course / program anyone with idea. I have one week to learn..is it possible You c

[Tutor] [Re:] I need help with the following question

2013-09-10 Thread Thabile Rampa
On Aug 27, 2013, at 3:40 AM, isaac Eric wrote > print "For a circle of radius %s the area is %s" % (radius,area) > Question: What is the purpose of %s ? I will admit that this is homework for me. However, this is more for my log book and not for marks. According to my understanding, the purpose

Re: [Tutor] [Re:] I need help with the following question

2013-09-10 Thread Oscar Benjamin
On 10 September 2013 08:58, Thabile Rampa wrote: > On Aug 27, 2013, at 3:40 AM, isaac Eric wrote > > > >> print "For a circle of radius %s the area is %s" % (radius,area) > >> Question: What is the purpose of %s ? > > I will admit that this is homework for me. However, this is more for my log >

Re: [Tutor] [Re:] I need help with the following question

2013-09-10 Thread Alan Gauld
On 10/09/13 08:58, Thabile Rampa wrote: print "For a circle of radius %s the area is %s" % (radius,area) Question: What is the purpose of %s ? Oscar has answered your basic question but to add to his comments thee are other reasons for using the %s rather than str() or simply printing the

Re: [Tutor] [Re:] I need help with the following question

2013-09-10 Thread Dave Angel
On 10/9/2013 03:58, Thabile Rampa wrote: > > On Aug 27, 2013, at 3:40 AM, isaac Eric > wrote > > > print "For a circle of radius %s the area is > %s" % (radius,area) > > > Question: What is the purpose of %s ?I will > admit that this is homework for me. However, this is more for m

Re: [Tutor] I need help with the following question

2013-09-10 Thread Dino Bektešević
> Message: 3 > Date: Tue, 10 Sep 2013 09:58:31 +0200 > From: Thabile Rampa > To: tutor@python.org > Subject: [Tutor] [Re:] I need help with the following question > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > On Aug 27, 2013, at 3:40 AM, isaac Eric wrote > > > > pr

[Tutor] Question about Functions

2013-09-10 Thread novo shot
Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" theFunction("this") result=theFunction("this either") print "reply is: ", result -

Re: [Tutor] Question about Functions

2013-09-10 Thread Joel Goldstick
On Tue, Sep 10, 2013 at 1:49 PM, novo shot wrote: > Dear tutors: > > The following is an example I found in the Raspberry Pi for Dummies book: > > #function test > > def theFunction(message): > print "I don't get ", message > return "ARRRGH!" > > theFunction("this") > the above line invo

[Tutor] Question about Functions

2013-09-10 Thread novo shot
Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" theFunction("this") result=theFunction("this either") print "reply is: ", result -

Re: [Tutor] Question about Functions

2013-09-10 Thread Chris Down
On 2013-09-10 13:34, novo shot wrote: > When I declare a variable to be equal as the fucntion > (result=theFunction("this either")) is Python also executing the function? You're not declaring it as equal, that would be `==' (or `is' for identity). `=' assigns, it doesn't check for equality. > The

Re: [Tutor] Question about Functions

2013-09-10 Thread Prasad, Ramit
novo shot wrote: > Dear tutors: > > The following is an example I found in the Raspberry Pi for Dummies book: > > #function test > > def theFunction(message): > print "I don't get ", message > return "ARRRGH!" > > theFunction("this") > > result=theFunction("this either") > print "reply

Re: [Tutor] Question about Functions

2013-09-10 Thread Alan Gauld
On 10/09/13 18:49, novo shot wrote: Dear tutors: The following is an example I found in the Raspberry Pi for Dummies book: #function test def theFunction(message): print "I don't get ", message return "ARRRGH!" All the code above does is define the function and assign it the name

Re: [Tutor] Question about Functions

2013-09-10 Thread Dino Bektešević
> Date: Tue, 10 Sep 2013 13:34:50 -0400 > From: novo shot > To: tutor@python.org > Subject: [Tutor] Question about Functions > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Dear tutors: > > The following is an example I found in the Raspberry Pi for Dummies book: > >

Re: [Tutor] Question about Functions

2013-09-10 Thread Steven D'Aprano
On Tue, Sep 10, 2013 at 01:49:11PM -0400, novo shot wrote: > When I declare a variable to be equal as the fucntion > (result=theFunction("this either")) is Python also executing the > function? No, you have misunderstood. Equals in programming languages is not the same as equals in mathematics.