Codice Gray: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Thijs!bot (discussione | contributi)
m Bot: Aggiungo: sk:Grayov kód
Ripebot (discussione | contributi)
Riga 131:
Esempio d'uso dalla shell Python:
<pre>
>>»> bins = ['000', '001', '010', '011', '100', '101', '110', '111']
>>»> grays = [tograystr(b) for b in bins]
>>»> grays
['000', '001', '011', '010', '110', '111', '101', '100']
>>»> [tobinarystr(g) for g in grays]
['000', '001', '010', '011', '100', '101', '110', '111']
</pre>