# factorial_nr.py
# Program to compute the factorial of a number non-recursively
def main():
print "This program computes the factorial of number.\n"
n = input("Please enter a positive whole number: ")
print "The factorial of", n, "is", factorial(n)
def factorial(n):
f = 1
while n > 1:
f = f * n
n = n - 1
return f
main()