文学城论坛
+A-

Sorry, 答案应该是2.22580645161

hoho365 2014-09-16 17:40:13 ( reads)

#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

跟帖(1)

jinjing

2014-09-17 10:20:27

请看我上面的无限次答案:0.69/0.31=2.225806452