[Tutor] Newbie Anxiety

2005-11-11 Thread Terry Kemmerer
Ah, memory lane time again :-) Oh, you had advanced BASIC - it allowed nested for loops! :-) My first BASIC only allowed for loops that could be written in a single line...Anything more complex you had to call a subroutine with GOSUB. Ha! Yes! As Monte Python would say, "Well..It got

Re: [Tutor] Newbie Anxiety

2005-11-11 Thread Alan Gauld
Ah, memory lane time again :-) >A good natured word of explanation for Chris and others: > 10 FORN=1TO10:?N:NEXTN: REM It is bad form not to name N after NEXT to > label which FOR NEXT loop is being incremented. Oh, you had advanced BASIC - it allowed nested for loops! :-) My first BASIC only al

[Tutor] Newbie Anxiety

2005-11-10 Thread Terry Kemmerer
A good natured word of explanation for Chris and others: Rest assured I am not criticizing the FORM and USE of white space that Python so eloquently uses, and subsequently makes it so beautiful and easy to read to the eye, by my example of a single line of BASIC. Actually, back in the day, I

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Liam Clarke-Hutchinson
lf Of Terry KemmererSent: Friday, 11 November 2005 12:25 p.m.To: Python_TUTORSubject: [Tutor] Newbie Anxiety (I accidentally sent this to the originator. Sorry.)Sweet!  Almost everything is sooo familiar, yet, merged in many interesting ways. I never had a DO WHILE statement, but in many

[Tutor] Newbie Anxiety

2005-11-10 Thread Terry Kemmerer
I want to thank everyone for their responses. This has help tremendously to ease my mind. Thanks! Branching in the program, is actually my real anxiety, as I have been feeling the void, (maybe that should be WITHDRAWALS!) as I am working my way through How To Think Like a Computer Scientist

[Tutor] Newbie Anxiety

2005-11-10 Thread Terry Kemmerer
(I accidentally sent this to the originator. Sorry.) Sweet!  Almost everything is sooo familiar, yet, merged in many interesting ways. I never had a DO WHILE statement, but in many ways, your further examples are like a combination of my old FOR NEXT loop and IF logical evaluation statement

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Alan Gauld
> compared Python to old style BASIC. You might find it helpful if you > were weaned on BASIC. You can still find the old site here: > > http://www.freenetpages.co.uk/hp/alan.gauld/oldtutor/ > > Check out the Loops topic for the GOTO discussion. Oops, so long since I looked at that version...

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Alan Gauld
> In Basic, I would have said: > > 10 x = x + 1 : print x : goto 10 Tsk, tsk, even in BASIC that's considered bad form :-) 10 FOR X =1 to 10 20 PRINT X 30 NEXT Would be the better BASIC form. And as you've seen Python provides a close analog to that in its for loop. for X in [1,2,3,4,

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Chris F.A. Johnson
On Thu, 10 Nov 2005, Terry Kemmerer wrote: > I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A > Computer Scientist" and I still can't count. > (Don't laugh! I can't play the violin either...) > > In Basic, I would have said: > > 10 x = x + 1 : print x : goto 10 Good heave

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Roel Schroeven
Terry Kemmerer wrote: > I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A > Computer Scientist" and I still can't count. > (Don't laugh! I can't play the violin either...) > > In Basic, I would have said: > > 10 x = x + 1 : print x : goto 10 > > run > 1 > 2 > 3 > etc > >

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Kent Johnson
Terry Kemmerer wrote: > In Basic, I would have said: > > 10 x = x + 1 : print x : goto 10 > > run > 1 > 2 > 3 > etc > > How is this done in Python? (So I can stop holding my breath as I study > this great languageand relax.) In Python there is no goto, as you have discovered. Loops

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread John Fouhy
On 11/11/05, Terry Kemmerer <[EMAIL PROTECTED]> wrote: > I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A > Computer Scientist" and I still can't count. > (Don't laugh! I can't play the violin either...) > > In Basic, I would have said: > > 10 x = x + 1 : print x : goto 10

[Tutor] Newbie Anxiety

2005-11-10 Thread Terry Kemmerer
I'm working on Ch. 5, "Fruitful Functions", or "How To Think Like A Computer Scientist" and I still can't count. (Don't laugh! I can't play the violin either...) In Basic, I would have said: 10  x = x + 1 :  print x : goto 10 run 1 2 3 etc I don't know why, but this great UNKNOWN bother