This is a book that will help you learn how to write Python programs that run on the command line. If you have never used the command line before, don’t worry! You can use programs like PyCharm or Microsoft’s VSCode to help you write and run these programs. If you are completely new to programming or to the Python language, I will try to cover everything I think you’ll need to know, although you might find it useful to read another book first if you’ve never heard of things like variables and functions.
In this section, we’ll discuss:
- Why we should learn to write command-line programs
- Tools and environments for writing code
- How and why we test software
Figure 0.1. This is the PyCharm tool being used to edit and run the hello.py
program from chapter 1. "Hello, World!"
Why do I want you to write command-line programs? For one, I think they strip a program down to the most bare essentials. We’re not going to try to complicated programs like an interactive 3D game that requires lots of other software to work. These programs all work with the barest of inputs and create only text output. We’re going to focus on learning the core Python language and how to write and test our programs.