Thanks everyone,<br><br>I need to round to the nearest half (finally occured).<br><br>Made some chnages to Wayne&#39;s code as follows:<br><br><div>x = 4.4348</div><div>if x % 1 &gt;= 0.5:</div><div>   round(x) # gives 5.0 if  the the value of the expression x % 1 exceeds 0.5<br>
</div>

<div>else:</div><div>   x = round(x) + 0.5 # gives 4.5, as in this case.<br><br>Many thanks!<br></div><div><br></div><br><br><div class="gmail_quote">On Fri, Oct 8, 2010 at 3:00 PM, Evert Rol <span dir="ltr">&lt;<a href="mailto:evert.rol@gmail.com">evert.rol@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">&gt; I realise that one cannot have a half integer :) I meant how would one round off to the first decimal nearest to either 0.5, or a whole number.<br>

&gt;<br>
&gt; Ugh...does anyone get what I&#39;m trying to articulate? :)<br>
<br>
</div>Multiply by 2, round(), divide by 2?<br>
<div><div></div><div class="h5"><br>
<br>
&gt;<br>
&gt; On Fri, Oct 8, 2010 at 2:51 PM, Sithembewena Lloyd Dube &lt;<a href="mailto:zebra05@gmail.com">zebra05@gmail.com</a>&gt; wrote:<br>
&gt; Hi folks,<br>
&gt;<br>
&gt; Supposing I had the float 4.4348 and I wished to round it off to the nearest half-integer upwards or downwards, how would I go about it?<br>
&gt;<br>
&gt; Many thanks...<br>
&gt;<br>
&gt; --<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Sithembewena Lloyd Dube<br><a href="http://www.lloyddube.com">http://www.lloyddube.com</a><br>