<div class="gmail_quote">On Thu, Feb 9, 2012 at 5:40 PM, Chris Kaynor <span dir="ltr"><<a href="mailto:ckaynor@zindagigames.com">ckaynor@zindagigames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div class="im">On Thu, Feb 9, 2012 at 5:23 PM, noydb <span dir="ltr"><<a href="mailto:jenn.duerr@gmail.com" target="_blank">jenn.duerr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


hmmm, okay.<br>
<br>
So how would you round UP always?  Say the number is 3219, so you want<br>
3300 returned.<br></blockquote><div><br></div></div><div>You may want to look into the mathematical floor and ceiling functions[1]. Python exposes them in the math module as floor and ceil[2].</div><div><br></div><div>[1] <a href="http://en.wikipedia.org/wiki/Floor_and_ceiling_functions" target="_blank">http://en.wikipedia.org/wiki/Floor_and_ceiling_functions</a></div>


<div>[2] <a href="http://docs.python.org/library/math.html#math.floor" target="_blank">http://docs.python.org/library/math.html#math.floor</a> and <a href="http://docs.python.org/library/math.html#math.ceil" target="_blank">http://docs.python.org/library/math.html#math.ceil</a></div>

<span class="HOEnZb"><font color="#888888">
<div> </div></font></span></div></blockquote><div><br></div><div>I should have added, you can use multiplication and division to apply those functions to other digits rather than the base one. For example, multiply by 10, floor, divide by ten, will floor to one decimal point.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></font></span></div><br>
</blockquote></div><br>