More tests
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
Sample Python module for testing MCP conversation continuity
|
||||
"""
|
||||
|
||||
|
||||
def fibonacci(n):
|
||||
"""Calculate fibonacci number recursively"""
|
||||
if n <= 1:
|
||||
return n
|
||||
return fibonacci(n-1) + fibonacci(n-2)
|
||||
return fibonacci(n - 1) + fibonacci(n - 2)
|
||||
|
||||
|
||||
def factorial(n):
|
||||
"""Calculate factorial iteratively"""
|
||||
@@ -15,17 +17,18 @@ def factorial(n):
|
||||
result *= i
|
||||
return result
|
||||
|
||||
|
||||
class Calculator:
|
||||
"""Simple calculator class"""
|
||||
|
||||
|
||||
def __init__(self):
|
||||
self.history = []
|
||||
|
||||
|
||||
def add(self, a, b):
|
||||
result = a + b
|
||||
self.history.append(f"{a} + {b} = {result}")
|
||||
return result
|
||||
|
||||
|
||||
def multiply(self, a, b):
|
||||
result = a * b
|
||||
self.history.append(f"{a} * {b} = {result}")
|
||||
|
||||
Reference in New Issue
Block a user