Secret Code Maker ๐๏ธ
Every letter has a secret number. ord() tells you the number,
chr() turns a number back into a letter:
print(ord("a")) # โ 97
print(chr(98)) # โ b
print(chr(ord("a") + 1)) # โ b (one letter along!)
See what happened there? Take a letter, get its number, add 1, turn it back into a letter. You just shifted the alphabet. ๐คโก๏ธ
Do that to every letter in a word and you've built a cipher โ Julius Caesar used exactly this trick to send secret orders 2000 years ago. ๐๏ธ
To build up a new string letter by letter, start empty and glue:
secret = ""
secret = secret + "q" # โ "q"
Your mission
Encode the word python by shifting every letter forward by one,
then print the secret message.
Do it right and python becomes... something no one can read. ๐ต๏ธโโ๏ธ
Your code
Press โถ Run to see what your code does!