下面代码的输出结果是 a=2.0 b=1.0 s=0 for n in range(1,4): s+=a/b t=a a=a+b b=t print(round(s,2))

admin2019-09-02  12

问题 下面代码的输出结果是
a=2.0
b=1.0
s=0
for n in range(1,4):
s+=a/b
t=a
a=a+b
b=t
print(round(s,2))

选项 A、5.17
B、3.5
C、6.77
D、8.39

答案A

解析
转载请注明原文地址:https://kaotiyun.com/show/e36p777K
0

相关试题推荐
最新回复(0)