Question #289407

Given a number and find the product of its digits as output . For example if the given number is 432 then output is 24 and another example if the given number is 110 then output is 0 and another example if the given number is 02 then the output is 2

Expert's answer

number = int(input("number: "))
prod = 1
for n in str(number):
	prod *= int(n)
print(prod)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS