X-Git-Url: http://git.tomasm.cz/krypto.git/blobdiff_plain/049578f7a3c8d48ac92a83eff1dcb3ee1943c6c9..5952333cc14470fd14ed7cf4fbb7d085f14d647f:/robot.py diff --git a/robot.py b/robot.py index a49c337..8b70a83 100755 --- a/robot.py +++ b/robot.py @@ -129,9 +129,12 @@ for char in sorted(freq, key=freq.get, reverse=True): float(freq[char])/celkem)) # Index koincidence -# TODO verze s mezerami -analyza.append("\nIndexy koincidence (vzdy bez mezer):") -analyza.append(koincidence.tabulka_indexu(zprava)) +if mod_m: + analyza.append("\nIndex koincidence (s mezerami):") + analyza.append('{0:.2%}'.format(koincidence.index_koincidence(zprava))) +if mod_x: + analyza.append("\nIndexy koincidence (bez mezer):") + analyza.append(koincidence.tabulka_indexu(zprava)) # Jakobsen if mod_m: