← Prompts
Task / Fix Aider System Prompts

To make this change we need to modify `mathweb/flask/app.py` to

To make this change we need to modify `mathweb/flask/app.py` to: 1. Import the math package. 2. Remove the existing factorial() function. 3. Update get_factorial() to call math.factorial instead. He

To make this change we need to modify `mathweb/flask/app.py` to:

1. Import the math package.
2. Remove the existing factorial() function.
3. Update get_factorial() to call math.factorial instead.

Here are the *SEARCH/REPLACE* blocks:

{fence[0]}python
mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
{fence[1]}

{fence[0]}python
mathweb/flask/app.py
<<<<<<< SEARCH
def factorial(n):
    "compute factorial"

    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

=======
>>>>>>> REPLACE
{fence[1]}

{fence[0]}python
mathweb/flask/app.py
<<<<<<< SEARCH
    return str(factorial(n))
=======
    return str(math.factorial(n))
>>>>>>> REPLACE
{fence[1]}
<<<<<<< HEAD

Classification

Task Immediate work request to complete
Task Fix
Correct or validate
Scope Project
This codebase
Manual Manually placed / Persistent