From 535e001c8f6dccd2aee4dbc192f731cde4cd6907 Mon Sep 17 00:00:00 2001 From: pythonboi Date: Fri, 10 Sep 2021 02:48:18 -0400 Subject: [PATCH] solve the shift issue --- Caesar_Cipher.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Caesar_Cipher.py b/Caesar_Cipher.py index 1f87d0e..a404a20 100644 --- a/Caesar_Cipher.py +++ b/Caesar_Cipher.py @@ -9,12 +9,31 @@ def encrypt(text, shift): count_text = len(text) move = [] - for run in range(0, count_text): + + for m in range(0, count_text): move += alphabet[shift] - if run in move: - move += alphabet[shift] + 1 + alphabet[shift] = alphabet[shift + 1] + shift = shift + 1 print(move) + # for run in range(0, count_text): + # move += alphabet[shift] + # + # + # + # + # + # + # + # + # for check in move: + # if check in move: + # newShift = alphabet[move] + 1 + # newShift += 1 + # move += alphabet[newShift] + # + # print(move) + encrypt(text=text, shift=shift)