Python problem

ach360 at gmail.com ach360 at gmail.com
Tue Feb 19 23:36:38 EST 2013


Loop_variable= 1
Pi=1.0
term=0
T=1.0
While (loop_variable> 0):
     Loop_variable=Loop_variable+1
     T=T+2.0
     
If (loop_variable%2 ==0):
             Term=0;
Else:
      term=1;


If term  ==0:
         Pi=Pi- float(1/T);
Else:
       Pi=Pi+ float(1/T);


     




More information about the Python-list mailing list