#!/usr/bin/python import sys; def factorial(num): result = 1 for i in range(1,num+1): result *= i return result def sumDigits(num): sum = 0; for i in range (0,len(num)): sum += int(num[i]); return sum; print "Result is: " + str(sumDigits(str(factorial(int(sys.argv[1])))))