import math
def compute_quantity(N0, lambda_, T):
N = N0 * math.exp(-lambda_ * T)
return N
# Example usage:
N0 = 100 # Initial quantity
lambda_ = 0.1 # Decay constant
T = 5 # Time
result = compute_quantity(N0, lambda_, T)
print(f"N = {N0} * exp(-{lambda_} * {T}) = {result}")
No comments:
Post a Comment