[Tutor] Teaching Python

Alan Gauld alan.gauld at btinternet.com
Wed Jan 6 14:04:24 EST 2016


On 06/01/16 18:23, yehudak . wrote:
> My grandson Guy (8th grader) is learning Python at school. That's what made
> me teach myself Python programming as well.
> Yesterday he asked my help in his homework:
> 
> Write a FOR-loop that prints all numbers up to 1000000

And the question is?
Python has a for loop and a print function.
It can easily handle numbers up to 1000000.
You probably need to look at the range() function too.

If you are having difficulty with any of those concepts
let us know and ideally show us the code that fails.

Alternatively if you are asking about what we think of
the homework question itself, then I'd say it seems
reasonable for a beginner. The only thing I'd gripe
about is the use of uppercase FOR.  That's because
Python is case sensitive and its for loop is
lowercase so the FOR could confuse some students.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list