This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Small_factorials

By: a guest on Jul 13th, 2010  |  syntax: Python  |  size: 0.18 KB  |  views: 88  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. t=input()
  2. l=[]
  3. def fac(n):
  4.         fact=1
  5.         for i in xrange(1,n+1):
  6.                 fact=fact*i
  7.         return fact
  8. for i in xrange(1,t+1):
  9.         j=input()      
  10.         l.append(fac(j))
  11. print('\n')
  12. for i in l:
  13.         print i
clone this paste RAW Paste Data