I was just re-reading What’s New In Python 3.0 and it states:
The round() function rounding strategy and return type have changed. Exact halfway cas
Try this code:
def roundup(input):
demo = input if str(input)[-1] != "5" else str(input).replace("5","6")
place = len(demo.split(".")[1])-1
return(round(float(demo),place))
The result will be:
>>> x = roundup(2.5)
>>> x
3.0
>>> x = roundup(2.05)
>>> x
2.1
>>> x = roundup(2.005)
>>> x
2.01
Ooutput you can check here: https://i.stack.imgur.com/QQUkS.png