Why is my function skipping the else statement?

前端 未结 0 783
旧时难觅i
旧时难觅i 2020-12-05 11:42
def pi_euler2(n):
    pi=[1,2]
    if n==1:
        return 1
    if n==2:
        two=sum([x**-1 for x in pi])
        return two
    for i in range(3,n+1):
                 


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题