xxxxxxxxxx
bc=Words(alphabet=[0,1],length=10); c=0
def lf(x):
eq1=(x[0] | (not x[1])) & (x[2] | (not x[3]))
eq2=(x[2] | (not x[3])) & (x[4] | (not x[5]))
eq3=(x[4] | (not x[5])) & (x[6] | (not x[7]))
eq4=(x[6] | (not x[7])) & (x[8] | (not x[9]))
return (eq1 & eq2 & eq3 & eq4)
for el in bc: c+=int(lf(el))
pretty_print(html('<p>true values: %d</p>'%c))
string=str(html(table([[(bc[i*10+j],lf(bc[i*5+j]))
for j in range(5)] for i in range(10)])))
html(string[:33]+'style="font-size:11px;" '+string[33:])
No comments:
Post a Comment