
Python is a general-purpose programming language that has been used to build a wide variety of software applications and run on multiple different platforms including Mac, Windows, and Linux. In this article, we gave you an Introduction to Python programming.
Python is easy to learn programming language and it has become popular in the market due to its simplicity, readability, portability, and robustness. Python is also free and Open-Source, thus, it will not cost you anything to download or use for a specific purpose.
Table of Contents
How to Install Python
Installing Python on your Window or Mac computer is easy and we will show you how to do that in this tutorial. In recent days it is possible that most computers whether it is Windows or Mac might have python pre-installed. Therefore, you need to check if Python is installed on your machine by executing the following commands.
Check if Python is Already Installed on Your Computer
For Windows and Mac users, it is required to run this command in the command prompt (CMD) or in the Terminal respectively.
Type 'python --version'
and press Enter key. If Python was pre-installed a message showing the Python version number will be displayed and if not, the command line will not be recognized.

Mac users can also run these commands if the previous one failed by typing 'python3 --version'.
This command checks in case Python version 3 is installed or not.

Note: Pre-installed Python versions sometimes are outdated and we always recommend to install the latest version of Python.
Installing Python on Windows and Mac
In case you discover that Python is not installed on your computer. The following steps might help you to install Python on your system.
- Install Python by downloading its latest version from Python.org.
- Run the downloaded installer and follow the instructions such as the installation path.
After you successfully installed the latest version of Python, now it is time to write your first Python code. Any of the following options can be used to write your first Python code.
- Run the Command Prompt for Windows or the Terminal app for Mac and type
'python'
or'python3'
for Mac users if the first one fail. - You can also run python code using the IDLE (Integrated Development and Learning Environment for Python). This environment or software will be installed automatically during the Python installation process. This environment can be found on both Windows and Mac.
- Write your first
'Hello World'
with a single or double quotation surrounded and press the Enter key.



Note: In the Command Prompt or the Terminal you can write whatever you want as long as it will not voilate the python syntax.
Example type5*2
and press Enter, the output will be10
,
or typeprint("Hello, World!!")
.
To exit the Python mode, type 'exit()'
or 'quit()'
.
There are tons of Integrated Development Environments (IDEs) platforms that Python developers prefer when they are writing Python codes. The most popular are Visual Studio (VS code) Code, PyCharm, NetBeans, Eclipse, Thony, IntelliJ IDEA, and many more.
How to Install Visual Studio Code Editor
Visual Studio Code is one of the most popular code editor platforms and it is free and runs on multiple operating system platforms such as Windows, macOS, and Linux. To successfully run a python code in a VS code editor you need to have the latest version of Python (e.g. version 3) installed on your computer, VS code, and Python code extension.
Installing Visual Studio Code on Windows and Mac
Assume Python 3 was installed already and proceed to follow the following instructions to fulfill the remaining requirements.
- Install VS code by downloading its latest version from code.visualstudio.com.
- Run the downloaded VS code installer and follow the instructions provided.
- Open the VS code editor after the installation and go to the extension section or press
Ctrl+Shift+X
for Windows andShift+Command+X
for Mac. - In the top left search box type
'python'
and select the Python extension published by Microsoft.

How to Run Python Code in Visual Studio Code
After successful installations, now it is time to write and run our first 'Hello World'
code in VS code editor. In VS code you need to create a file and save it as ‘.py‘ (e.g. hello.py). To create a new file in VS code press Ctrl+N
for Windows and Command+N
for Mac and write the following code.
Go to File Explorer and select New Text File. Then name the file whatever you want. Example hello.py and press Enter.

Write the following Python to the file you created.
print("Hello, World!!")
Now run your code written by clicking the run button (▶) on the right corner of the VS code window or by pressing the Ctrl+F5 (for Windows) or Shift+Enter (this runs only the selected line) for both Mac and Windows.
The output reads as follows:
Hello, World!!
Benefits of learning Python
Python, with its simplicity, versatility, and thriving ecosystem, offers numerous advantages that have contributed to its popularity and extensive use across various fields. Whether you are a beginner or an experienced programmer, learning Python can have a significant impact on your coding journey.
learning Python will eventually offers you a gateway to acquire the power of Python, unlock new possibilities, and propel your coding career forward. Let’s explore the key benefits of acquiring this valuable skill.
- Easy to Learn, Easy to Code: Python’s clear and readable syntax makes it an excellent choice for beginners. Its simplicity allows new programmers to quickly grasp the language and start building projects. With Python, you can minimize the learning curve and dive into coding efficiently.
- Python: Best for Data Science: Python has become the go-to language for data science and analytics. Its rich ecosystem includes libraries like NumPy, Pandas, and Scikit-learn, providing powerful tools for data manipulation, analysis, and visualization. Python empowers you to work with large datasets and unlock the potential of data science.
- Versatile and Multifaceted: Python’s versatility shines through its wide range of applications. From web development to automation, desktop applications to scientific computing, machine learning to artificial intelligence, Python can handle almost any task. Its adaptability and flexibility make it a go-to choice for diverse projects.
- Power in Simplicity: Despite its simplicity, Python doesn’t compromise on power. It offers robust features, dynamic typing, automatic memory management, and a vast standard library. These qualities enable developers to accomplish complex tasks efficiently and deliver high-quality code.
- Streamlined Web Development: Python frameworks like Django and Flask provide efficient solutions for web development. These frameworks offer ready-to-use components, seamless database integration, and built-in security features. With Python, you can build scalable and feature-rich web applications with ease.
- Thriving Online Community: Python boasts a large and active community of developers worldwide. This community-driven approach ensures continuous improvement and expansion of Python’s ecosystem. It also means you can tap into a wealth of resources, participate in forums, engage in online tutorials, and seek support whenever you need it.
- Abundance of Libraries and Scripts: Python’s extensive collection of libraries and scripts simplifies the development process. Whether you need to handle scientific calculations, create visualizations, process data, or perform specific tasks, there’s likely a pre-built solution available. These libraries and scripts save you time and effort, allowing you to focus on your project’s core logic.
- Lucrative Career Opportunities: Python’s versatility and widespread adoption have led to a significant demand for Python developers across industries. Mastery of Python opens up diverse career opportunities, from software development to data science, machine learning, automation, and more. Python’s consistently high ranking among the top programming languages reinforces its value in the job market.
- Earning Potential: Python developers often enjoy competitive salaries due to the demand and versatility of the language. Its relevance in various domains, such as web development, data science, and machine learning, positions Python professionals for attractive compensation packages.
- Easy Comprehension, Fun Experience: Python’s simplicity and readability make it an ideal language for beginners. Its clean syntax and well-structured code promote understanding and reduce the learning curve. Learning Python is not only educational but also enjoyable, allowing newcomers to quickly grasp programming concepts and gain confidence.
These ar.
Summary
Python is a popular programming language and it has been used to solve a wide range of problems from different domains such as Mathematics, Web Development, Game Development, and many more. This article, the purpose was to teach beginners how to install pre-request packages and run Python code successfully. The aim of this tutorial was to make an introduction to Python and covered the most important installation packages of Python and step by step guide on how to write and execute a simple Python code of ‘Hello World’. Finally, we encourage beginners to continue learning the next Python lessons and tutorials to improve their Python skills and master how to create basic programs.
References
- Python documentations: https://docs.python.org/3.12/tutorial/index.html,
- Python downloads https://www.python.org/downloads/,
- VS Code downloads https://code.visualstudio.com/docs/?dv=osx.
Key Terms
Python for beginners, Install Python, Windows and Mac, Python version check, IDLE, IDE, print ‘Hellow World’.