In the result it shows "s= 8" pls tell me how to remove the blank?
s,t,n = 0,0,1
while t <= s:
s,t,n = s+2,t+n,n+1
else:
print('s=',s,n)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.or
Hi there,
As shown in the codes below, I want to end the loop until the s is no
greater than -5 but I found there is no "do... loop until..." like C so
what should I do? I will write it in C's style
s,n = 0,1
do:
import math
s=s+(math.log((n+1)/(n+2))/math.log(2))
loop until s < -5
print