def fac(x): if x == 0: return 1 if x == 1: return 1 return x * fac(x-1) n = input("Skriv et tal: ") print "Fakultet", n , "er", fac(n)