小白求教两个关于Python的问题,下面的两个程序 问题在哪 怎么在spyder中执行就是不出结果要么就无限循环
程序一:i=0residual=500000interest_tuple=[0.01,0.02,0.03,0.035]repay=30000whileresidual>0...
程序一:
i=0
residual=500000
interest_tuple=[0.01,0.02,0.03,0.035]
repay=30000
while residual>0:
i=i+1
print(i)
if i<=4:
interest=interest_tuple[:5]
else:
interest=0.05
residual=residual*(interest+1)-repay
print(i+1)
程序二:
def square_sum(a,b):
a=5
b=6
x=square_sum(a,b)
print(x) 展开
i=0
residual=500000
interest_tuple=[0.01,0.02,0.03,0.035]
repay=30000
while residual>0:
i=i+1
print(i)
if i<=4:
interest=interest_tuple[:5]
else:
interest=0.05
residual=residual*(interest+1)-repay
print(i+1)
程序二:
def square_sum(a,b):
a=5
b=6
x=square_sum(a,b)
print(x) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询