Python and Schools

Tim Ottinger TOttinge at indy.rr.com
Wed Apr 16 22:24:22 EDT 2003


Donnal Walter wrote:
> I am a physican first and programmer second. I've never taken a course 
> in computer science, and I do not know the meaning of O(N). OTOH, just 
> from following comp.lang.python I think I have a pretty good idea why
> 
>     s += str(i)
> 
> would be a bad idea. Nevertheless, I certainly would not be opposed to 
> deepening my understanding. (PythonIAN is great, BTW.)

I came in late. If we're talking about schools, I'm not sure whether 
we're talking about colleges and adult ed, or high school, or elementary 
school. Are we talking about teaching people who know nothing about
programming?

If a 3rd grader wrote the s += str(i) or s = s+str(i) I would be pretty
impressed. I don't expect them to understand O() notation. I wouldn't
be to thrilled to see it in professional code. I don't expect that it
would make it through the PEPs. But it would be expressing the basic
idea, and then later it could be explained why it is so awfully slow
on the big loops.

Maybe not too bad for 5th or 6th grade, since they're far from writing
any professional code. You tolerate more with rank beginners, and you
correct it in time.

tim





More information about the Python-list mailing list