提问人:Hassan Bouamoud 提问时间:12/23/2022 最后编辑:SelcukHassan Bouamoud 更新时间:12/23/2022 访问量:27
两个相关序列
Two related sequences
问:
我想找到这两个序列的值,但我仍然无法做到这一点:
这是我尝试的代码:
from math import sqrt,pi
def a(n,b):
if n==1:
return 30
else:
return a(n-1)*1.1+(sqrt(2)/(1+pi))*b(n-1)
def b(n):
if n == 1:
return 10
else:
return b(n - 1) * 1.1 - (sqrt(2) / (1 + pi)) * a(n - 1)
print(a(2,b))
在 python 中对这两个序列进行编程
答: 暂无答案
上一个:了解 Python 序列
下一个:如何打印包含部分输入的所有行?
评论
b
a