Skip to content

Commit 0f48f78

Browse files
committed
Add type annotations
1 parent d287a93 commit 0f48f78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

coin-register/coin_operations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
def num_coins(cents):
1+
def num_coins(cents: int) -> int:
22

3-
'''
3+
'''
44
num_coins(33) == 5
55
33 => 1 quarter, 1 nickel, 3 pennies => 5 coins
66
'''
@@ -21,14 +21,14 @@ def num_coins(cents):
2121
elif remaning_coins >= 10:
2222
number_of_coins += 1
2323
remaning_coins -= 10
24-
24+
2525
elif remaning_coins >= 5:
2626
number_of_coins += 1
2727
remaning_coins -= 5
28-
28+
2929
elif remaning_coins >= 1:
3030
number_of_coins += 1
3131
remaning_coins -= 1
32-
32+
3333

3434
return number_of_coins

0 commit comments

Comments
 (0)