How to round a float to two decimals?

That doesn’t even work. It should and I can’t understand what the problem is but it still gives answers like 12.499998 and 30.100002