Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 21 Online
OpenStudy (anonymous):

I'm still rather early on in the course, and I've been looking through the readings and can't seem to find it, so I'll ask here: How exactly do you specify a specific amount of digits after the decimal point to work with with a float? round() is similar to what I need, but round() rounds up, and what I need is something that would only round down.

OpenStudy (anonymous):

Wow I spoke way too soon. For anyone with this same question, I found a module that solves the problem handily: http://docs.python.org/library/decimal.html#module-decimal

OpenStudy (anonymous):

This seems to work the same way for me- I can't figure out a problem until I type a question. And the link will come in handy- thanks.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!