The function
math.rounddoes not exist, just use the built in
round
def x_round(x): print(round(x*4)/4)
Note that
At the moment, your function doesn’t return anything. It might be better to
return the value from your function, instead of printing it.
def x_round(x): return round(x*4)/4print(x_round(11.20))
If you want to round up, use
math.ceil.
def x_round(x): return math.ceil(x*4)/4


![Python round to nearest 0.25 [duplicate] Python round to nearest 0.25 [duplicate]](http://www.mshxw.com/aiimages/31/386884.png)
