def X(n):
# 差分方程的解
return 2 * (-1)**(n + 1)
n_values = [0, 1, 2, 3, 4, 5]
for n in n_values:
print(f"X({n}) = {X(n)}")
print("學號:202331014
3005")
def X(n):
# 差分方程的解
return 2 * (-1)**(n + 1)
n_values = [0, 1, 2, 3, 4, 5]
for n in n_values:
print(f"X({n}) = {X(n)}")
print("學號:202331014
3005")