Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mapmeld
on Aug 30, 2012
|
parent
|
context
|
favorite
| on:
Teaching my 10 year old niece how to program.
To teach for loops, I start with this example:
word = "banana" for letter in word: print letter
It isn't a counter, but it makes it clear that print is happening for each part of the word. Then you can write programs using arrays and other counters.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: