Posted on 6/18/2025 5:23:11 PM by Admin

Python Basics: Your First Steps Into Python World!

Welcome, future programmers! Do you often wonder how websites work, how apps on your phone are built, and how a computer can think? The answer to all these questions is "Programming." Computer programming has made it possible for our computers to become intelligent enough to behave and think like humans. There are many programming languages that have been developed to serve different purposes. For instance, some are useful for web development, while others are handy for creating mobile apps, etc. Among all these languages, the one that stands out for its versatility, simplicity, and sheer power is Python!

This article will help you take your first steps into the world of Python programming. In this Python series, you will learn the basics of Python, and then we will gradually move on to advanced Python programming, which includes machine learning, web scraping, and much more. I highly recommend following this tutorial if you want to build strong skills in Python.


The Power of Python: Why It's So Popular?

Python's popularity is a testament to its capabilities. It is highly versatile, serving as the backbone of various modern technologies, including web applications built with frameworks like Django and Flask, as well as cutting-edge data science, AI, and machine learning projects.

Its readability and simplicity are what make it highly beginner-friendly. Its syntax is clean, intuitive, and close to natural language, making it highly adaptable for beginners. Another plus point is its massive and vibrant developer community that is available to help you resolve issues quickly. Moreover, you can find hundreds of pre-built libraries and frameworks that make your life much easier by saving you from writing thousands of lines of code. Finally, Python is a cross-platform language, meaning that a program written on Windows runs seamlessly on other platforms (such as macOS or Linux) without any significant modifications.


Setting Up Python Environment

To get started with Python programming, you must set up a Python environment. That includes installing a stable version of Python along with a code editor. I highly recommend installing the Python 3.x version, as it is the latest stable and actively maintained version. For writing code, we will use PyCharm Community Edition. You can choose another IDE as per your preference.

Installing Python on Windows

  • Go to Python's Official Website.
  • Download the latest stable Python 3.x installer.
  • Run the downloaded installer. On the first screen that appears when you start the installation, ensure that you check the "Add Python to Path" checkbox, as it enables you to run Python from any directory via the Command Prompt.
  • Then, click "Install Now" and follow the on-screen instructions to complete the installation.

Once the installation completes, open the command prompt and run the following command to confirm successful installation:


python – version

If it prints Python's current version, the installation was successful.

Control Panel showing Python version installed
Control Panel showing Python version installed

If not, then delete the program from settings and retry installing Python following the above steps.


Integrated Development Environment (IDE) and Text Editors

Now, it's time to install an IDE and text editor that allows you to write, debug, and interpret Python code. Although you can use a simple text editor like Notepad to write Python code, an IDE comes with benefits like auto-code completion, debugging, and project management that significantly increase your coding speed and enhance your experience.

For this tutorial, I'll be using PyCharm Community Edition, which is an excellent choice for beginners as well. Here's how you can install it:

Installing PyCharm Community Edition

  • Go to the Official JetBrains Pycharm Download page.
  • Download the Community Edition for your operating system.
  • Run the installer and follow the on-screen instructions to complete the installation. When choosing settings, I recommend sticking with the default settings, as they are sufficient for basic Python programming.

Your First Python Program: "Hello World!"

Now that we have everything in place, it's time to write our first Python program – The classic "Hello World!".

  • First, launch PyCharm.
  • Select New Project on the welcome screen.
  • Select a location to save the program and click Create. Wait for the IDE to create project files for you.
  • Once the project is ready, right-click on the project folder, select New, and then choose Python File.
  • Now, name your Python file, such as "MyFirstProgram.py," and hit Enter.
    • Note: The .py extension is crucial for Python files. Although PyCharm automatically adds it to your file names, it is a good practice to specify it manually.
  • In your text editor, enter the following line of code:

print("Hello World!")

  • In the above code:
    • print is a built-in function that allows you to write something on the output screen. Anything inside the quotation marks ("”) is printed as it is on the screen.
    • "Hello World!" is called a string, which is a sequence of characters written inside the single or double quotes.
  • It's time to run your code. To execute the code you have written, either click on the Green Play button or hit Shift + F10 keys simultaneously.

You will see the output of your code on the bottom of the screen as follows:

PyCharm Interface
PyCharm Interface

If you had the same output as above, Bingo! You have successfully started your journey with Python programming. If you face any errors, I recommend looking for any of the following issues in your program:

  • Syntax Error: Make sure that you have spelled everything right. Ensure that you have opened and closed the parentheses and quotation marks promptly.

Hopefully, you were able to resolve the issue. If not, you can google the error by copying and pasting it into Google's search bar. In the subsequent articles, we will further explore basic Python concepts.


Sharpen Your Skills with These Next Guides