```
# This is a function that calculates the factorial of a given number
def factorialize(num):
  # Set the variable 'factorial' to 1
  factorial = 1
  # Iterate from 1 to 'num' using the range function
  for i in range(1, num):
    # Multiply the 'factorial' variable by the current number in the iteration
    factorial *= i
  # Return the final value of 'factorial'
  return factorial
```
def factorialize(num):
  factorial = 1
  for i in range(1, num):
    factorial *= i
  
  return factorial
Rifatta questo codice e aggiungi commenti.