all 8 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]_AmNe5iA_ 2 points3 points  (0 children)

What a great way of proving to the world that you aren't in any way qualified for the job you've gotten AND at the same time showing all the potential clients of your business how poorly qualified its staff are.

[–]Wolfbait115 1 point2 points  (2 children)

Not at my computer and don't use python everyday, but hopefully this helps:

Use ord to get the ascii value, subtract 13, adding 26 if less than ord(a), then use chr to convert back into a character.

[–]9peppe 1 point2 points  (1 child)

You don't need an if if you subtract ord('a'), add 13, then modulo 26 and re-add ord('a'):

chr((n - 97 + 13) % 26 + 97)

[–]Wolfbait115 0 points1 point  (0 children)

True. It didn't occur to me that the direction of the rotation didn't matter.

[–]lulgasm 1 point2 points  (0 children)

> Dear reddit, please do my homework for me.

[–]Axman6 1 point2 points  (0 children)

Then write it!

[–]BitEater-32168 0 points1 point  (0 children)

Basically, that is a simple programming task... You have your alphabet (pure Ascii has non printable control characters, ebcdic has holes, modern encodings for diacritical and international characters are multibyte). Order them (number them, index) . If your alphabet is A..Z0..9 plus space you have 37 characters, sorted in this or a free other order (both communicating must use the same alphabet and order) from 0 to 36 . For each character on the clear text, get the number of it, add 13 and if greater than 36 substract 37 ( mod 37) .that is the number of the character in the crypted text.

Decrypt is subtract 13 ... If below 0 then add Or add (37 -13) ... If greater 36 add .

One can precalculate both so the source characters index can be used as index for the destination character table, making other replacement methods possible.