Web Analytics Made Easy -
StatCounter python problems - CodingForum

Announcement

Collapse
No announcement yet.

python problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • python problems

    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

  • #2
    ----------------------------
    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

    Comment


    • #3
      ive never used python.....do you rec. it over vb6/?
      Umm...dude?
      Hell just broke loose...

      Comment

      Working...
      X