title: How to do factorial using multiplication based on another function that has two parameters
body: <p>How can I do factorial based on the multiply function? Thats what I have and the problem I'm running into is it gives me 0 instead of 5 != 120.</p>
  
  <p>EDIT NEWEEST: how can I fix the double factorial to give me the right number?
  if I do 5, it should give me 5!!= 15 but it gives me 12 why is that?</p>
  
  <p><strong>SOURCE CODE</strong></p>
  
  <pre><code>def multiply(num1,num2):
  
      sum_of_multiplication= 0
      for i in range(num2):
          sum_of_multiplication = add(sum_of_multiplication,num1)
      return sum_of_multiplication
  
  
  
  def factorial(num1):
      factorial_num = num1
      for i in range(1,num1):
          num1 = multiply(factorial_num,num1)
          print(factorial_num)
      print(str(num1) + "!= " + str(factorial_num))
  
  
  
   def double_factorial(num1):
      double_factorial_num = 2
      for i in range(1,num1-2):
          double_factorial_num = multiply(double_factorial_num, i)
          print(double_factorial_num)
      print(str(num1) + "!!= " + str(double_factorial_num))
  
  double_factorial = double_factorial(int(input("please enter your intger:")))
  </code></pre>