"Create a function that calculates the factorial of a number using recursion"
def factorial(n):
"""Calculate factorial of n using recursion"""
if n <= 1:
return 1
return n * factorial(n - 1)
# Example usage
print(factorial(5)) # Output: 120
Industry-leading voice recognition specifically trained on programming terminology and syntax.
Get working code in milliseconds. No waiting, no compilation delays.
Support for all major programming languages and frameworks.
Works seamlessly with VS Code, IntelliJ, and other popular development environments.
Your code never leaves your device. All processing happens locally.
Generated code follows industry standards and best practices automatically.
Describe what you want to code in natural language
Our AI understands your intent and generates code
See the generated code with syntax highlighting
Copy to your project or deploy directly