Write a Python program that allows a user to enter a number and prints out the sum of the digits of the number.
1234
num = int(input("Enter a number: ")) 

# find sum of its digits 
sum = 0
while num > 0: 
	digit = num % 10
	sum += digit 
	num //= 10
	
# print the result 
print("Sum of digits of the number:", sum)