- 6 Ağu 2015
- 3
- 0
Merhabalar. Kendi kendime ufak alıştırma nihayetinde bir şeyler karalayayım dedim. Bu basit şifreleme için çok teferruatlı kodlamalar var. Hiç gerginliğe sebep olmadan metni input olarak veriyosunuz, olası tüm çıktıları görüyorsunuz. Sorusu olan varsa cevaplarım.
İyi forumlar
Kod burda:
ciphertext = input("sifreli metni giriniz")
ciphertext = ciphertext.upper()
key = 0
ascii = [ord(ch) for word in ciphertext for ch in word]
for key in range(0,26):
new_list = [x+key for x in ascii]
for i,b in enumerate(new_list):
new_list = b-26 if b>90 else b
b = ''.join(chr(i) for i in new_list)
print("ROT",key,"=",b)
key += 1
İyi forumlar
Kod burda:
ciphertext = input("sifreli metni giriniz")
ciphertext = ciphertext.upper()
key = 0
ascii = [ord(ch) for word in ciphertext for ch in word]
for key in range(0,26):
new_list = [x+key for x in ascii]
for i,b in enumerate(new_list):
new_list = b-26 if b>90 else b
b = ''.join(chr(i) for i in new_list)
print("ROT",key,"=",b)
key += 1
Son düzenleme: