Skip to content

Instantly share code, notes, and snippets.

@sonerb
Created November 21, 2017 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonerb/d8e7be453dfbd6a743ec51f18cb0195d to your computer and use it in GitHub Desktop.
Save sonerb/d8e7be453dfbd6a743ec51f18cb0195d to your computer and use it in GitHub Desktop.
import math
def round_up(floating_number, power=2):
return math.ceil(floating_number*(10**power)) / (10**power)
x = 1
y = 6
result = x/y
print(round_up(result,8))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment