[Tutor] (no subject)
amadeo.bellotti at gmail.com
Fri Aug 18 06:06:51 CEST 2006
thank you but IDLE doesnt seem to work on Suse 9.2 do you know a way to fix
On 8/17/06, Alan Gauld <alan.gauld at freenet.co.uk> wrote:
> > thank you Mr. Johnson this is my first program so its a little
> > sloppy. I'm
> > using gedit ill check out the other editors that u have thank you
> If you have Python you will have either IDLE or Pythonwin (or both)
> Both of these will allow block indent/unindent so simply load the
> code into IDLE to do the indentation.. You can go back to gedit
> afterwards if you like.
> But as Kent said you should ideally aimto write the code as
> functions, each about 5-50 lines long (less than 5 and the advantage
> is minimal, mor than 50 is just too long - around 12 lines per
> is a good average IMHO
> But don't use number of lines as the deciding factor! Divide the code
> into blocks of code that do something logical that you can describe
> in a few words (see the comments from Danny to Kermit for examples!)
> Use those few words to name the function. Consider how to pass key
> data between the funbctions using parameters and return values.
> If you don't know how to write functions take a look at the Functions
> topic of my tutor.
> Alan Gauld
> Author of the Learn to Program web site
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor