Sorry, 答案应该是2.22580645161

来源: 2014-09-16 17:40:13 [旧帖] [给我悄悄话] 本文已被阅读:

#Python code:

a = 0.69
b = 1 - a

average = 0
left = 1.0
i = 0

while i average += i * b * left
left = left * a
i = i + 1

print average