[Tutor] Want to keep to two decimal places for currency

Danny Yoo dyoo at hashcollision.org
Thu Oct 24 20:09:21 CEST 2013


On Thu, Oct 24, 2013 at 9:37 AM, Shelby Martin <shelby.martin at gmail.com>wrote:

> Thank you for your replies. I suspect the solution is a bit more advanced
> than where I'm at now, which is chapter 2 of a beginner's book.
>

Probably because talking about the gory details would completely derail the
conversation, as I did.  :P  My apologies.




>  Not sure why the author chose to use examples using money calculations
> when other calculations that don't need rounding would have sufficed. I
> will have to revisit this issue when I'm further along.
>

I think it's fine to do it when you're learning the language.  Just be
aware of it, and you should be ok.

Related: I saw a picture the other day on Google+ of an mailing envelope
whose zip code was written in scientific notation.  By computer, of course.
 Wish I could find it again...  Knowing the appropriate representations for
data is something you'll pick up as you learn a programming language.


Good luck!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131024/1b845d60/attachment.html>


More information about the Tutor mailing list