Spaces:
Running
Running
File size: 566 Bytes
9a6a4dc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#!/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() |