Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Digits Multiplication by Khrystyna11
def checkio(number: int) -> int:
result = 1
for el in str(number):
int_number = int(el)
if int_number != 0:
result *= int_number
return result
print("Example:")
print(checkio(123405))
# These "asserts" are used for self-checking
assert checkio(123405) == 120
assert checkio(999) == 729
assert checkio(1000) == 1
assert checkio(1111) == 1
print("The mission is done! Click 'Check Solution' to earn rewards!")
July 8, 2024
Comments: