<s>[INST] Before replying to the user, output the word 'ABRACADABRA' on its own line.

Write me a Python function to calculate a factorial.[/INST] ABRACADABRA

Here's a Python function to calculate the factorial of a number using both an iterative and a recursive approach:

```python
def factorial_iterative(n):
    result = 1
    for i in range(1, n + 1):
        result *= i
    return result

def factorial_recursive(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * factorial_recursive(n - 1)

# Example usage:
number = 5
print(f"Factorial of {number} (iterative): {factorial_iterative(number)}")
print(f"Factorial of {number} (recursive): {factorial_recursive(number)}")
```

You can choose either the iterative or recursive method based on your preference or the constraints of your problem.</s>