CoCalc Public FilesActivity1.sagewsOpen with one click!
Author: Kody J. Everson
Views : 26
Compute Environment: Ubuntu 18.04 (Deprecated)
S = ShiftCryptosystem(AlphabeticStrings()) cipherText = "QRRQHKDVBHWGLVFRYHUHGDQBZDUOLNHSXUSRVHWREHVHUYHGEBWKHWKHRUBRIQXPEHUVRUUHODWLYLWBDQGLWVHHPVYHUBXQOLNHOBWKDWDQBRQHZLOOGRVRIRUPDQBBHDUV" encodedText = S.encoding(cipherText) print "Shift\tResulting Possible Code Words:" for i in [0..25]: print i, "\t", S.deciphering(i, encodedText)
Shift Resulting Possible Code Words: 0 QRRQHKDVBHWGLVFRYHUHGDQBZDUOLNHSXUSRVHWREHVHUYHGEBWKHWKHRUBRIQXPEHUVRUUHODWLYLWBDQGLWVHHPVYHUBXQOLNHOBWKDWDQBRQHZLOOGRVRIRUPDQBBHDUV 1 PQQPGJCUAGVFKUEQXGTGFCPAYCTNKMGRWTRQUGVQDGUGTXGFDAVJGVJGQTAQHPWODGTUQTTGNCVKXKVACPFKVUGGOUXGTAWPNKMGNAVJCVCPAQPGYKNNFQUQHQTOCPAAGCTU 2 OPPOFIBTZFUEJTDPWFSFEBOZXBSMJLFQVSQPTFUPCFTFSWFECZUIFUIFPSZPGOVNCFSTPSSFMBUJWJUZBOEJUTFFNTWFSZVOMJLFMZUIBUBOZPOFXJMMEPTPGPSNBOZZFBST 3 NOONEHASYETDISCOVEREDANYWARLIKEPURPOSETOBESERVEDBYTHETHEORYOFNUMBERSORRELATIVITYANDITSEEMSVERYUNLIKELYTHATANYONEWILLDOSOFORMANYYEARS 4 MNNMDGZRXDSCHRBNUDQDCZMXVZQKHJDOTQONRDSNADRDQUDCAXSGDSGDNQXNEMTLADQRNQQDKZSHUHSXZMCHSRDDLRUDQXTMKHJDKXSGZSZMXNMDVHKKCNRNENQLZMXXDZQR 5 LMMLCFYQWCRBGQAMTCPCBYLWUYPJGICNSPNMQCRMZCQCPTCBZWRFCRFCMPWMDLSKZCPQMPPCJ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