[Edu-sig] Fw: [Visualpython-users] Re: strange output

Arthur ajs@ix.netcom.com
Fri, 4 Oct 2002 19:20:37 -0400


>The course is a *programming* course (not a physics course, although it is
for
>physics undergrads). You can read the handbook and my dissertaion
discussing
>Python's relative merits here:

I read excerpts of the handbook and dissertation - both of which are
interesting.

But I don't agree with your take on "/".  Or necessarily disagree.  1/2=.5
*is* more intutive to someone who has not programmed before.  Common sense
would allow us to conclude that is true in the absence of any study of the
issue.  Just as I think common sense allows us to conclude that list[1] is
more intutively the first item in the list, rather than the second.

You toss off the issue of numeric typing is a few sentences of the handbook,
and it comes into play in the creation of Numeric arrays.

The problem is that I don't think you will know to what extent your students
actually grasp the significance of the numeric typing issue.  One can get
far enough without understanding it.  It only becomes an issue when it
becomes an issue.
For example perhaps while doing a

a[1] = .5

to an array that was initially as an int array, not so much consciously as
by a=array([1,2,3}).

Not something that one does everyday.

The interesting study might be to see if your students acutally *get* the
significance and pitfalls of the underlying numeric typing system.

Seems to me that for a physics student, it is particularly important that
they do.  For example, to be aware of the pitfalls that can arise in
comparing values for equality.

So I still ask whether it is necessarily true that the more intutive
behavior is the behavior we should prefer in all cases.  It is perhaps
unintuitive to suggest not.  But I am suggesting it.

Art