> histograms for. I'd like to round the data to the nearest 10, i.e if
> the value is 15.34  should we round down to 10? and conversely
rounding
> say 19.30 to 20. I'm thinking 15.5 and above would round up. Can
anyone
> point me a at a quick and painless way of achieving this?

divide by 10, round the result, multiply by 10.

HTH,

Alan G.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to