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.
> 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
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
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
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
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
-
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
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
-