Commit 4638ca3d by Owo Sugiana

Toleransi round_up() ditingkatkan dari 0.1 menjadi 0.01

1 parent f58994e1
0.2.1 2023-01-31
----------------
- round_up() ditingkatkan toleransi pecahannya dari 0.1 menjadi 0.01
0.2 2022-02-09
----------------
- round_up() disempurnakan yaitu bila pecahan kurang dari 0.1 maka akan
......
......@@ -6,7 +6,7 @@ from datetime import (
def round_up(n):
i = int(n)
plus = (int(n*10) - int(n)*10) and 1
plus = (int(n*100) - int(n)*100) and 1
if n < 0:
return i - plus
return i + plus
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!