what i have done so far is supposed to difine the parity bits positions but its not working well
can you help me fix it and give me a guidline of what to do next ?
here is the code
def hamming(k):
lk=len(k)
i=0
while True :
if lk>2**i:
k=k[:2**i-1]+'p'+k[2**i:]
lk=lk+1
i=i+1
else:
break
return k

New Topic/Question
Reply



MultiQuote






|