# # Cviceni 4, ukol A: Caesarova sifra # def decode(key, text): return "" def main(): decoded_code = "" for key in range(1,27): decoded_code = decode(encoded_text_1, key) if "caesar" in decoded_code: print(decoded_code) break else: print "Nelze dekodovat." encoded_text_1 = """ qrkuvgzxu y yopo rghazo byzgr pyks f sxzbein vu zbks ayzqtazo her zu vuane xufsgx tkhu vrgt uzkbxoz so tgxai juquxgt zutar pyks pgq b vxohupo ykvuz beqxoq uhupo o bgrkitoqg ujfhxupo g zgq zu fgyk tk zu tkvapjk pkt zgq vuiqkp igkygx pkyzk zo rkqio jg lgqz yzubqe fkt pg vxkj zkhua pyks skr vxui gf jtky so xufas arkzkr uhpgrgy sk tg ybein quhkxioin ujktg pkt b vkxrgin bk yvkxioin fginubgs yo inrgjte yuaj rov so hajk hkf zbein vuaz vxgbu brgjtuaz xufnujtuaz sgs pg g bos u iu zo pjk ghein zk juygjor tg zxat qxgrubtg qrkuvgzxg zu tkfto yvgztk zu tkfto yvgztk qxgrubtg g zgqe fk yk po yzgtky """ encoded_text_2 = """ gpkyfe av uperdztbp fsavbkfmv fizvekfmrep jbizgkfmrtz gifxirdfmrtz arqpb bkvip m iftv 1991 ermiyc xlzuf mre ifjjld gpkyfe av mpmzave arbf fgve jflitv gifavbk bkvip quridr erszqz zejkrcrtez srczbp gif mvkjzel svqepty gcrkwfivd lezo nzeufnj drt fj mv mvkjzev uzjkizsltz jpjkvdl czelo av gpkyfe jfltrjkz qrbcruez zejkrcrtv dzdf azev av m evd zdgcvdvekfmre rgczbrtez jvimvi qfgv zejkrcrkfi r mvkjzer bfewzxlirtezty erjkifal czelofmv uzjkizsltv wzidp ivu yrk """ main()