...

View Full Version : python problems



velious
02-18-2004, 07:56 PM
For someone reading this and is able to explain things to idiots then I could use your help.

Now for some reason I cant seem to understand what this means
----------------------------
def hello(who):
print "Hello,", who
----------------------------

what does it mean if the () are empy or if they are full?
also does this mean that "hello" and "who" are being multiplied?
like in math 2(4) means to multiply..so..I'm not understanding, why not just use a variable in the first place?..thank you

Jason
02-18-2004, 08:58 PM
----------------------------
def hello(who):
print "Hello,", who
----------------------------

ok, it took me a second to figure this one out since I don't use python all that much. But here it is. "hello" is the function name. So when someone calls the function hello it will print out Hello, "name"
eg: my name is Jason. so calling the function
hello(Jason) would result in

Hello, Jason

Does that help and make sence? So in this case, the variable "who" stores the persons name...


Jason

Mitch
02-20-2004, 05:10 PM
ive never used python.....do you rec. it over vb6/?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum