num = input("Enter your number: ") result = 0 for n in str(num): result += int(n) print("Result: ",result) #code by fawlid