Programming Tutorial for absolute beginners

Clodoaldo Pinto clodoaldo.pinto at gmail.com
Sat Apr 8 15:49:15 EDT 2006


Duncan Smith wrote:
> James wrote:
> > Perhaps use the phrase "whole number" there and mention that in
> > programming they're called integers. Having a glossary with
> > definitions for things like integer, float etc etc. would be good if
> > when you talked about integers it linked to the glossary. And
> > similarly use "decimals" for floats? Less sure about that one though.
> > But anyway you don't need to go into the whole type thing, just
> > mention that Python distinguishes between doing maths with whole
> > numbers and decimals.
> >
>
> In general they are integers, and "integer" is not a Python type, so I
> don't see a problem with the term.  The problem I saw was that there was
> no explanation for the returned value.

How would I explain that 3 / 2 is 1 without entering the type realm?
What if I say that if one don't use the point the interpreter will also
not use it? Would i be laying? Isn't it better to just let it go? I
think the typical non programmer newbie just don't care two much about
reasons as long as there is a clear rule. No point in the question then
no point in the answer.

>  Using the term "decimal" is
> probably a bad idea, given Python decimals.  But I'm not sure you need
> to come up with a suitable term until you actually get round to
> explaining types (at which point the problem disappears).
>

As I think float is scaring I changed it in the program comments where
it appeared for decimal. I don't worry about precision as much as I
worry about fluidity. I don't want anyone stoping to consult a
dictionary or a glossary.

Now the integer versus whole. As a non native english speaker I don't
know what sounds less mathematical and more natural. I changed integer
to whole following the previous suggestion but I really don't know.

Regards, Clodoaldo




More information about the Python-list mailing list