Python is among the most popular programming languages in the world. It is ranked high in different StackOverflow programming surveys each year. This article helps beginners familiarize themselves with the basic concepts of Python. According to the official documentation, Python is a high-level and general-purpose programming language.
Python was built to be easier to use than other programming languages. It’s usually much easier to read Python code and much faster to write code in Python than in other languages.
Getting Started with Python
First of all, to check the version of Python installed in your machine, type as follows in the terminal.
If there is no Python installed, you can install it using the instuctions in the official website Download Python
First Python Code
We are going to write our first Python program which prints out our name by typing in our preferred code editor as follows:

We then run our first python code by navigating to the directory where we have saved the file then run it:
Alternatively, we can run the python code directly from the terminal since it is quicker and easier.
That's it we have created our first python program. To exit the terminal,you type quit()
Python Syntax
Like any other language, Python also follows a given set of rules such as:
- Python is case-sensitive, which means, for example, Name and name have different meanings.
- The standard is to use English names in programming.
- All variables should start with a lowercase letter, eg, var = 4.
- Functions begin with lowercase.
- Classes begins with a capital letter.
Variables and Data types.
Variables are the basic unit of storage for a program. Programs perform operations on variables and alter or fill in their values. Objects are higher level constructs that include one or more variables and the set of operations that work on these variables. Let's try creating variables to store data.

To check for the data type of a variable, you proceed as shown below:

Classes and Objects
Every Object belongs to a certain class. Classes are abstract descriptions of the structure and functions of an object. Objects are created when an instance of the class is created by the program. For example, “Fruit” is a class while an “Apple” is an object.
Congratulations on creating our first Python program and getting a brief introduction. In the next Python post, I am going to focus on Data Structures in Python.



Top comments (0)