We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 473d91c commit 2cc4d46Copy full SHA for 2cc4d46
1 file changed
split_number
@@ -0,0 +1,15 @@
1
+def checkio(number):
2
+
3
+ sum = 1
4
+ zz = map(int,str(number))
5
+ for x in zz:
6
+ if x != 0:
7
+ sum *=x
8
+ return sum
9
10
+#These "asserts" using only for self-checking and not necessary for auto-testing
11
+if __name__ == '__main__':
12
+ assert checkio(123405) == 120
13
+ assert checkio(999) == 729
14
+ assert checkio(1000) == 1
15
+ assert checkio(1111) == 1
0 commit comments