Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: python problems

  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry 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
    Regular Coder
    Join Date
    Feb 2003
    Location
    California
    Posts
    925
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ----------------------------
    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

  • #3
    New Coder
    Join Date
    Feb 2004
    Location
    Virginia
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ive never used python.....do you rec. it over vb6/?
    Umm...dude?
    Hell just broke loose...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •