Python Program Development
John M. Essick · 2024
Abstract This chapter focuses on writing a simple Python integer-parity-detector program that tests, and then reports, the parity (i.e., evenness or oddness) of an integer. Central features of Python are presented, including its programming environment (terminal session and IDLE program editor), data types, conditional branching, and exception (error) handling. In addition, Python’s support of object-oriented programming is introduced. A Do It Yourself project explores writing a Python program that accepts two numeric values as input, performs a mathematical calculation, and then outputs the result, while a Use It! example covers how to include comments within Python code as a means of program documentation.