New Guy
nards_collective
nards_collective at yahoo.com.au
Wed Nov 19 01:45:24 EST 2003
Thanks for the advise gys, but I still can't decipher the problem.
Below is a copy of the entir progra, the erro is stil in the first
'if' command.
NArDS
a = input ("Value for A? ")
b = input ("Value for B? ")
c = input ("Value for C? ")
d = input ("Value for D? ")
gen=0
print gen,a,b,c,d
while gen <=40 :
gen=gen+1
e= (b+d)/2+ (b-c)
f= (a+c)/2+(b-d)
g=(b+d)/2+(c-a)
h=(a+c)/2+(d-b)
print gen,a,b,c,d
print gen,e,f,g,h
if e >= 1:
a=e
else :
a=0
if b>= 1 :
b=f
else:
b=0
if g >= 1:
c=g
else:
c=0
if h >= 1:
d=h
else:
d=0
i=a/(a+b+c+d)*100
j=b/(a+b+c+d)*100
k=c/(a+b+c+d)*100
l=d/(a+b+c+d)*100
a = i
b = j
c = k
d = l
print gen,a,b,c,d
More information about the Python-list
mailing list