Python 101 — Before Learning Python
Python is a less complex programming language compared to C. That’s why almost every student and programmer uses Python. Of course, C and Python require different skill sets, but much like English, Python is the current lingua franca (or common language) of the programming world.
In this lesson, we will learn Python’s basic terms. By the end of the lesson, we will be able to write our first Python code and learn the most commonly used function in Python.
First of all, we start with DATA TYPES. Each data type has unique characteristics that set it apart from the others. For this first lesson, we will cover Integers, Floats, Strings, and Booleans.
Get Faruk Atıcı’s stories in your inbox
Join Medium for free to get updates from this writer.
An Integer is simply a discrete number. In Python, we represent integers using the int function. Integers are the basic numbers we learn in mathematics, such as 1, -2, 84, -7234, and so on.
A Float represents continuous numbers (decimals). The main difference between integers and floats is that floats often result from division operations. In Python, we use float. Examples of floats include 7.2, 5.8, 8.7, and 28.6.
A String is simply text. In Python, we cannot just type text directly; we need to enclose it in quotation marks ("" or ''). This is a way of telling Python, "Treat this as a text string." Examples of strings are "Hi", "Medium", "You", and "How".
Boolean expressions are simply True and False. In computer language, 1 equals true and 0 equals false. We all know that early computers were programmed using only ones and zeros. This was pioneered by George Boole, and that’s why the programming world honors his memory.
So, we talked about quotation marks (""). But here is a question: what if we need to leave a note or a comment in Python? What should we do? The answer is very simple. We just put a # symbol and write whatever we want.
Before the end of the lesson, we will learn the first function I promised. This is one of the most widely used functions in Python and appears in almost every program. That function is print().
As I promised, let’s see how print() works in action. Whenever you want to display something on the screen, you just type print() and put your text or numbers inside the parentheses.
print(“Hello , Medium!”)
When you run this code, Python will show those values right on your screen. That’s it for our first lesson! You’ve officially learned the basics of data types, comments, and your very first function. Stay tuned for the next lessons, and happy coding!






