We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d287a93 + 3a4e355 commit 9ea0789Copy full SHA for 9ea0789
coin-register/REAME.md
@@ -5,4 +5,5 @@ Code to manipulate coins value
5
### Worked concepts
6
7
* for loop
8
-* control flow
+* control flow
9
+* type annotations
coin-register/coin_operations.py
@@ -1,6 +1,6 @@
1
-def num_coins(cents):
+def num_coins(cents: int) -> int:
2
3
- '''
+ '''
4
num_coins(33) == 5
33 => 1 quarter, 1 nickel, 3 pennies => 5 coins
'''
@@ -21,14 +21,14 @@ def num_coins(cents):
21
elif remaning_coins >= 10:
22
number_of_coins += 1
23
remaning_coins -= 10
24
-
+
25
elif remaning_coins >= 5:
26
27
remaning_coins -= 5
28
29
elif remaning_coins >= 1:
30
31
remaning_coins -= 1
32
33
34
return number_of_coins
0 commit comments