Computers do not understand language the way humans do. Instead, they operate using binary code, a system of ones and zeros that represent data and instructions. Writing directly in binary would be extremely difficult for humans, so programming languages were developed to provide a structured way to communicate with computers using syntax and semantics that are easier to understand. These higher-level languages allow programmers to write code efficiently without dealing with the complexities of machine language.
For a programming language to be useful, it must have a way to translate human-readable code into machine-executable instructions. There are two primary methods: interpretation and compilation (Louden & Lambert, 2011).
Interpreters execute code line by line. Python is an interpreted language, meaning the code is read and executed immediately without needing to be converted into a separate machine-language file.
Compilers translate an entire program into machine code before execution. Languages like C and C++ use compilers to generate an executable file that runs directly on the hardware.
Python actually compiles source code into byte code, which is an intermediate form of low-level instructions. This byte code runs on the Python Virtual Machine (PVM), allowing Python to be platform-independent. This process makes Python flexible and easy to use, as programmers do not need to worry about platform-specific machine code.
An integer is a whole number, but in reality, it is stored in binary form at the hardware level. In Python, the int type can handle very large numbers because Python automatically manages memory allocation. For example:
number = 23
Here, number is an integer assigned the value 23, which is famously associated with Michael Jordan. The abstraction allows programmers to perform calculations without needing to manage memory storage or worry about how the number is represented in binary form.
A string represents a sequence of characters, but at a lower level, it consists of individual character encodings stored in memory. Python provides the str type to make working with text easier. For instance:
name = "Michael Jordan"
This assignment abstracts away the complexity of storing each letter as a unique code. Python allows easy manipulation of strings, such as:
full_message = name + " is number " + str(number)
print(full_message)
The output will be:
Michael Jordan is number 23
This abstraction hides the underlying memory structure and encoding while enabling convenient string operations.
Data types like integers and strings abstract away the complexities of binary representation, memory management, and character encoding. These abstractions enable developers to focus on solving problems instead of worrying about how data is stored at the hardware level. Similarly, Python's use of interpretation and byte code compilation simplifies programming by handling execution behind the scenes.
 Louden, K. C., & Lambert, K. A. (2011). Programming Languages: Principles and Practice (3rd ed.). San Jose State University & Washington and Lee University.