Re: [Tutor] Repeating a routine

2006-02-22 Thread Brian van den Broek
John Connors said unto the world upon 22/02/06 07:59 PM: > G'day, > > I think my peanut sized brain is starting to understand how to do this. Glad you're making progress :-) It's normal it takes a while to learn to adjust your thinking to a rigid and precise system. I've made some pretty big

Re: [Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day Sean, >Jumping to the middle of a book or movie will lead to similar confusion. > >Give a look at Dive Into Python. Available as either a book or online. I have it and it's a great book, and I have worked my way through a lot of it unfortunately my brain can't take something in unless I do

Re: [Tutor] Repeating a routine

2006-02-22 Thread Sean Perry
Jumping to the middle of a book or movie will lead to similar confusion. Give a look at Dive Into Python. Available as either a book or online. http://www.diveintopython.org/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinf

Re: [Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day, I think my peanut sized brain is starting to understand how to do this. I tried with a simple dice game where 4 dice are rolled, if the total of the last 2 dice rolled is 6 you win. It's kinda pointless using 4 dice rolls when only 2 are needed but I wanted to prove to myself I could cal

Re: [Tutor] Repeating a routine

2006-02-22 Thread Brian Gustin
yeah GOTO , in basic (I used to write software in Commodore BASIC myself) is similar to a for or while loop - In BASIC, you would write a program, *including* line numbers thus: 10 a=32 20 b="hello" 30 print a 40 print b 50 a=a-1 60 if a > 0 goto 20 70 end (It's probably not 100% syntactically

Re: [Tutor] Repeating a routine

2006-02-22 Thread Pawel Kraszewski
Dnia środa, 22 lutego 2006 12:43, John Connors napisał: > I know goto and gosub are evil, bad habits but I'm starting to miss them. You SHOULD miss them. GOSUB is called a function call in Python (you call a function by its name, rather than by its starting line number) Someone misinformed you

Re: [Tutor] Repeating a routine

2006-02-22 Thread Brian van den Broek
John Connors said unto the world upon 22/02/06 05:43 AM: > G'day, > > With my only programming experience being C-64 Basic I'm finding that I > struggle a bit understanding some of the concepts of Python, I wish I > could block basic right out of my brain. > > One of the things I can't get a gr

[Tutor] Repeating a routine

2006-02-22 Thread John Connors
G'day, With my only programming experience being C-64 Basic I'm finding that I struggle a bit understanding some of the concepts of Python, I wish I could block basic right out of my brain. One of the things I can't get a grasp of is how to repeat a routine many times. For example a simple d