Re: [Tutor] loop example from 'Learning to Program'

2007-07-15 Thread Luke Paireepinart
ron wrote: > ok, this code is written with vi: > > #/usr/bin/env python > This should be #! not just #, that makes it a regular comment. > #foreach.py > > myList = [1,2,3,4] > for index in range(len(myList)): > myList[index] += 1 > print myList > ~ > > here's the result: > > ~$ ./foreach

Re: [Tutor] loop example from 'Learning to Program'

2007-07-15 Thread Luke Paireepinart
ron wrote: > So I'm starting to work my way through Alan's online > book, reading, then typing in code and seeing it work. > The following is a snippet of code in the Loops > section. I'm getting an error message. > > Here's the code and error message: > > myList = [1,2,3,4] > for index in range(

Re: [Tutor] loop example from 'Learning to Program'

2007-07-15 Thread Luke Paireepinart
ron wrote: > Here's the code and error message: > Where? Is it *gasp* invisdible? > > > > > > Be a PS3 game guru. > Get your game face on with the latest PS3 news and previews at Yahoo! Games. > http://videoga

Re: [Tutor] loop example from 'Learning to Program'

2007-07-15 Thread ron
thanks Luke, you folks are awesome! Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz __

Re: [Tutor] loop example from 'Learning to Program'

2007-07-15 Thread ron
ok, this code is written with vi: #/usr/bin/env python #foreach.py myList = [1,2,3,4] for index in range(len(myList)): myList[index] += 1 print myList ~ here's the result: ~$ ./foreach.py ./foreach.py: line 3: myList: command not found ./foreach.py: line 4: syntax error near unexpecte

[Tutor] loop example from 'Learning to Program'

2007-07-15 Thread ron
So I'm starting to work my way through Alan's online book, reading, then typing in code and seeing it work. The following is a snippet of code in the Loops section. I'm getting an error message. Here's the code and error message: myList = [1,2,3,4] for index in range(len(myList)): myList[in

[Tutor] loop example from 'Learning to Program'

2007-07-15 Thread ron
Here's the code and error message: Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 ___