2007/5/30, Brian van den Broek <[EMAIL PROTECTED]>: > Another fwd, folks. > > Brian vdB > > -------- Original Message -------- > Subject: Re: [Tutor] trouble with "if" > Date: Tue, 29 May 2007 23:28:46 -0500 > From: Adam Urbas <[EMAIL PROTECTED]> > To: Brian van den Broek <[EMAIL PROTECTED]> > References: <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > <[EMAIL PROTECTED]> > > I'm having trouble with the parentheses after the def thing(). IDLE > says that there is something wrong with it. If I type something > between them, it says that there is something wrong with the quotation > marks. If I just leave it like (), then it says that something is > wrong with what is after the parentheses. Unless my code is supposed > to go between the parentheses. I'll try that.
Between the parentheses should go the variables you use (if any) when calling the function. For example: def sayhello(): print "Hello" You don't have any parameters here, so there's nothing between the brackets def say(word): print word Now there is one parameter, namely word. def sayboth(word1,word2): print word1 print word2 Here there are two parameters, word1 and word2. The number of parameters should be the same as the number of parameters you use when calling the function: sayhello() say("One text") sayboth("One text","Another text") There is a much used method to make some of the parameters optional, but we'll not go into that. To know what is going wrong with your program, I would have to see the program (or a simplified version of it that still goes wrong) and preferably also the exact error message you are getting. -- Andre Engels, [EMAIL PROTECTED] ICQ: 6260644 -- Skype: a_engels _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor