June 2018
Beginner to intermediate
100 pages
2h 9m
English
Let's go ahead and open the Terminal and follow these steps to implement Caesar cipher in Python:
>>> str = "ABCDE">>> str.find("A")0>>> str.find("B")1>>> exit()
$ nano caesar1.py
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"str_in = raw_input("Enter message, like HELLO: ")n = len(str_in)str_out = ""for i in range(n): c = str_in[i] loc = alpha.find(c) print i, c, loc, newloc = loc + ...