63. Python Program to find the Sum and Product of individual digits of a given number.
How does this program work?
- This program is used to find the sum and product of individual digits of a given number using Python.
- We can followed by the below code we can get the Output easily.
Here is the code
n = int(input("Enter number: "))
a = 1
c = 0
while n > 0:
b = n % 10
a = a * b
c = c + b
n = int(n/10)
print(a," is a product of a digit")
print(c," is a sum of a digit")