Skip to content

Commit 6459cf4

Browse files
Add typing and snake casing to maths/decimal_isolate.py
1 parent 467ade2 commit 6459cf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

maths/decimal_isolate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66

7-
def decimal_isolate(number, digitAmount):
7+
def decimal_isolate(number: float, digit_amount: int) -> float:
88

99
"""
1010
Isolates the decimal part of a number.
@@ -28,8 +28,8 @@ def decimal_isolate(number, digitAmount):
2828
>>> decimal_isolate(-14.123, 3)
2929
-0.123
3030
"""
31-
if digitAmount > 0:
32-
return round(number - int(number), digitAmount)
31+
if digit_amount > 0:
32+
return round(number - int(number), digit_amount)
3333
return number - int(number)
3434

3535

0 commit comments

Comments
 (0)