Created
December 7, 2020 00:33
-
-
Save pignuante/a208250b61d951d1d3caca786f32d398 to your computer and use it in GitHub Desktop.
0.5 단위로 round
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def myround(x, prec=2, base=.05): | |
return round(base * round(float(x)/base), prec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment