3.2. Introduction to Programming in Python#
Much of the work involved in encryption and decryption are algorithmic, predictable, and routine tasks. These types of tasks are perfect for automation using a computer. This textbook will focus on using the Python programming language to instruct your computer to perform these tasks for you, instead of having to work through them with pencil and paper.
To begin, let’s get the basics of Python under our belt. Much like the grammar rules of any spoken language, instructions in Python need to be formatted in a very specific way for the computer to make sense of them. This format is called the syntax of your instructions. Unlike humans, who can often make sense of expressions with improper or incorrect grammar, computers are much less flexible. The syntax must be perfect for the computer to understand the task you’ve asked it to perform. To illustrate proper syntax of a few basic commands Python commands, let’s run a few instructions one at a time.