Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit 9faf5f8

Browse files
Merge pull request #675 from hiarijit/patch-1
Update caesar-cipher.py
2 parents c4d4434 + 4c355c8 commit 9faf5f8

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

projects/caesar_cipher/caesar-cipher.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def encrypt(text, shift):
4242
if chosen_letter == letter:
4343
new_shift = i + shift
4444
new_shift = new_shift % 26
45-
if new_shift > 25:
46-
new_shift = new_shift - 24
4745
position = alphabet[new_shift]
4846
new_word.append(position)
4947
i = i + 1
@@ -66,8 +64,6 @@ def decrypt(text, shift):
6664
if chosen_letter == letter:
6765
new_shift = i + shift
6866
new_shift = new_shift % 26
69-
if new_shift > 25:
70-
new_shift = new_shift - 24
7167
position = alphabet[new_shift]
7268
new_word.append(position)
7369
i = i + 1

0 commit comments

Comments
 (0)