Skip to content

Commit

Permalink
fix: +/- 1 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
milanoid committed Nov 7, 2016
1 parent 5b87053 commit 34b1107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def rot13(self, text):
if character.isupper():
rot13_char = chr(ord(character) + 13)
if ord(rot13_char) > ord('Z'):
rot13_char = chr(ord(rot13_char) - 25)
rot13_char = chr(ord(rot13_char) - 26)

elif character.islower():
rot13_char = chr(ord(character) + 13)
if ord(rot13_char) > ord('z'):
rot13_char = chr(ord(rot13_char) - 25)
rot13_char = chr(ord(rot13_char) - 26)
else:
rot13_char = character
rot13_text.append(rot13_char)
Expand Down

0 comments on commit 34b1107

Please sign in to comment.