Zakir Hussain

Aug 05, 2025 • 2 min read

Introduction to Programming and Getting Started with Python

Introduction to Programming and Getting Started with Python

What is Programming?

Programming is the process of writing instructions that a computer can follow to perform specific tasks. These instructions are written in programming languages such as Python, JavaScript, or C++. Programming is the foundation of software, websites, mobile apps, and even hardware systems.

Why Learn Programming?

  • Solve real-world problems with code

  • Automate repetitive tasks

  • Build websites, apps, and games

  • Boost your career prospects in tech and other industries

Why Python?

Python is one of the most popular languages for beginners and professionals alike, thanks to its:

  • Simple and readable syntax

  • Huge community and support

  • Versatility (web, data science, automation, AI, etc.)

Installing Python

  1. Download Python:

  2. Install Python:

    • Run the downloaded installer.

    • On Windows, ensure the checkbox “Add Python to PATH” is checked.

    • Follow the on-screen instructions to complete the installation.

  3. Verify Installation:

    • Open the command prompt (Windows) or terminal (Mac/Linux).

    • Type:

      bash

      python --version

      You should see something like Python 3.12.1this.

Installing VS Code

Visual Studio Code (VS Code) is a free, lightweight, and powerful code editor that works well for Python programming.

Steps:

  1. Download from the VS Code website.

  2. Install it by following the instructions for your platform.

  3. Open VS Code.

  4. Install the Python extension:

    • Click on Extensions (square icon, left sidebar)

    • Search for “Python” and install the official Microsoft extension.

Writing Your First Python Program

Let’s dive into hands-on coding!

1. Open VS Code and Create a New File

  • Open VS Code.

  • Click.File > New File

  • Save the file as .pyhello.py (the.py extension tells VS Code this is a Python file).

2. Write This Code

python

print("Hello, World!")

3. Run Your Program

  • Open a terminal in VS Code (View > Terminal or press `Ctrl + ``).

  • Type:

    bash

    python hello.py

  • You should see:

    text

    Hello, World!

Explanation:
print() It is a Python function that outputs text to the screen. "Hello, World!" Is it the string you want to display?

Understanding Python Syntax

Python’s syntax is designed to be clean and easy to read.

Key Features:

  • Case Sensitivity:
    Printand print They are not the same. Python is case-sensitive.

  • Indentation:
    Indentation is required for blocks of code, such as inside functions, loops, or conditionals (usually 4 spaces).

    python

    if True: print("This is indented")

    The code belowif True: must be indented.

  • Comments:
    Use the # symbol for comments.

    python

    # This is a comment print("Comments are ignored by Python")

  • Variables:

    python

    age = 25 name = "Alice" print(name, "is", age, "years old")

    Variables store values for later use.

  • No Semicolons Needed:
    Each statement doesn’t require a semicolon at the end.

Example: User Input and Output

python

name = input("Enter your name: ") print("Hello,", name)

  • input() pauses and waits for you to type something.

  • The result is always a string.

Summary

  • Programming lets you talk to computers and build amazing things.

  • Python is a great language to start with: install it, add VS Code, and you’re ready to code!

  • Your first Python program uses print().

  • Key syntax: indentation, case sensitivity, comments, variables, and no semicolons.

Join Zakir on Peerlist!

Join amazing folks like Zakir and thousands of other builders on Peerlist.

peerlist.io/

It’s available... this username is available! 😃

Claim your username before it's too late!

This username is already taken, you’re a little late.😐

2

8

0