Answer to Question #289407 in Python for Product of it digi

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

1
Expert's answer
2022-01-21T12:06:40-0500
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS