I am just getting started on teaching python as a first language. (The
same course at the same university that Andy is teaching this fall,
actually.) Since the course is actually a breadth introduction to
computing as well as an introduction to programming, time is of the
essence.

My decision was to simply tell students that fractional numbers on
computers are tricky business, and that if they plan to go much
further they would have to learn about them, but that I was going to
stick to integers.

fwiw I find this to be the most cognitively accessible approach. The
advantage of Python as a first language is the minimization of
intellectual clutter. We can start with procedural knowledge and move
to semantic knowledge gradually. Avoiding the complexities of the
representation of fractional numbers seems like the best approach at
this stage.

If I had a bit longer I would still not introduce floats or decimals
or infinite precision or fraction objects or any other variation
common or obscure at least for the first few weeks.

I think it's best, at least for didactic purposes, that there is a
handy division operator that is closed on the integers, and I'd prefer
to maintain the existing behavior of operator.div when presented with
two ints.

mt
_______________________________________________
Edu-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to