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

Re: [Tutor] Newbie Anxiety

2005-11-10 Thread Liam Clarke-Hutchinson
Title: Message Hi Terry,   Python is great, very much so if the last you used was Basic.   I highly recommend Alan Gauld's tutorial, but I look forward to your queries here. :-) Liam Clarke-Hutchinson -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

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