Talk:Non-Programmer's Tutorial for Python 2.6/Defining Functions

Hello, there is an error on the exercise, where at the one write "q" the program says "Unrecognized option." so it mus says nothing or good bye, w/e. it should says at the code elif choice == q:       print "",

and it will go out quietly,

thanks for this nice tutorial!!


 * I think the print "", might confuse people, so I changed it to a plain print statement. It's a bit of a pity having to handle the q choice case in two places here (while and elif) because we don't know break yet. Apart from that the elif colon was missing. --Siebengang 09:27, 15 October 2007 (UTC)

Different or more wording needed
"Inside of the function a_var is 15 since the function is called with a_func(b_var). Since at that point in time b_var is 15, the call to the function is a_func(15) This ends up setting a_var to 15 when it is inside of a_func."
 * I think this is important enough to be explained in greater detail. --Charlesrkiss 3 April 2008
 * I tried to expand upon it somewhat to try and reinforce the point. --Tehdrago (talk) 15:15, 16 November 2008 (UTC)
 * I do not consider myself a stupid man, and have understood everything so far, but I have been stuck on this for two days. Why does defining C_VAR define a_var? Why does it "recognize" b_var as 15 while previously totally ignoring a_var? Why is a_func(b_var) a legitimate way to define something while the above a_func(a_var) is totally ignored? This is giving me a nosebleed and I can't for the love of God figure it out. Please help.

"When eliminating repeated code, you often have variables in the repeated code. In Python, these are dealt with in a special way."
 * I find the wording here a bit confusing, I'm still not sure what was trying to be stated, even after having re-read it several times. --Tehdrago (talk) 15:15, 16 November 2008 (UTC)