n! means n (n 1) … 3 2 1. Find the sum of the digits in the number 100! The wording of this one I considered a little tricky, took me a few tries to figure out what it actually wanted.
1 2 3 4 5 6 7 8 9 10 | total = 100 i = 99 while (i > 0): total = total * i i = i - 1 sum = 0 for d in str(total): sum = sum + int(d) print sum |