A Caesar cypher is a weak form of encryption that involves “rotating” each letter by a fixed number of places. To rotate a letter means to shift it through the alphabet, wrapping around to the beginning if necessary, so ’B’ rotated by 2 is ’D’ and ’Z’ rotated by 2 is ’B’. To rotate a word, rotate each letter by the same amount. For example, “cheer” rotated by 7 is “jolly”. Fun fact: In the movie 2001: A Space Odyssey, the ship computer is called HAL, which is IBM rotated by -1. Write a function called ceaser_cypher that takes a string and an integer as parameters, and returns a new string that contains the letters from the original string rotated by the given amount.
-
Notifications
You must be signed in to change notification settings - Fork 0
A Caesar cypher is a weak form of encryption that involves “rotating” each letter by a fixed number of places. To rotate a letter means to shift it through the alphabet, wrapping around to the beginning if necessary, so ’B’ rotated by 2 is ’D’ and ’Z’ rotated by 2 is ’B’. To rotate a word, rotate each letter by the same amount. For example, “chee…
theyug7/Caesar-cypher-
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A Caesar cypher is a weak form of encryption that involves “rotating” each letter by a fixed number of places. To rotate a letter means to shift it through the alphabet, wrapping around to the beginning if necessary, so ’B’ rotated by 2 is ’D’ and ’Z’ rotated by 2 is ’B’. To rotate a word, rotate each letter by the same amount. For example, “chee…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published