input: Write a function to compute the factorial of a given number using a loop. The function should return the factorial as the result.
  
  def factorial(n):
   fact = 1
   for i in range(2,n+1):
    fact = fact * i
   return fact
  
  assert factorial(7)==5040
output: def factorial(n):
   fact = 1
   for i in range(2,n+1):
    fact = fact * i
   return fact