X-Git-Url: http://git.tomasm.cz/krypto.git/blobdiff_plain/049578f7a3c8d48ac92a83eff1dcb3ee1943c6c9..25f105e35c579d9d68afb72fc56ddd1c96144c5a:/robot.py diff --git a/robot.py b/robot.py index a49c337..27d17bc 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, True))) +if mod_x: + analyza.append("\nIndexy koincidence (bez mezer):") + analyza.append(koincidence.tabulka_indexu(zprava)) # Jakobsen if mod_m: