Spaces:
Running
Running
#!/usr/bin/env python3 | |
""" | |
Sample Python code file for testing the enhanced file handler. | |
This file demonstrates code file processing capabilities. | |
""" | |
def calculate_fibonacci(n): | |
"""Calculate the nth Fibonacci number.""" | |
if n <= 1: | |
return n | |
return calculate_fibonacci(n-1) + calculate_fibonacci(n-2) | |
def main(): | |
"""Main function to demonstrate the code.""" | |
print("Testing Fibonacci calculation:") | |
for i in range(10): | |
result = calculate_fibonacci(i) | |
print(f"F({i}) = {result}") | |
if __name__ == "__main__": | |
main() |