Michael Sparks wrote: > def approx(x): > return int(x+1.0) I doubt this is what the OP is looking for.
>>> approx(3.2) 4 >>> approx(3.0) 4 Others have pointed to math.ceil, which is most likely what the OP wants. /Mikael Olofsson Universitetslektor (Senior Lecturer [BrE], Associate Professor [AmE]) Linköpings universitet ----------------------------------------------------------------------- E-Mail: [EMAIL PROTECTED] WWW: http://www.dtr.isy.liu.se/en/staff/mikael Phone: +46 - (0)13 - 28 1343 Telefax: +46 - (0)13 - 28 1339 ----------------------------------------------------------------------- Linköpings kammarkör: www.kammarkoren.com Vi söker tenorer och basar! -- http://mail.python.org/mailman/listinfo/python-list