Code Crafter IT Innovation
Loading...
  • Bansal Computer Center
  • punjabedu.bansalcenter.com

Basics of Programming

What is Programming?

Programming is the process of writing instructions that a computer can understand and execute to perform tasks.

Examples of Programming

What is a Program?

A program is a set of instructions written in a programming language to solve a problem.

# Example (Python):
print("Hello World")

Why Python?

Types of Python Modes

Python works in two primary modes depending on how you want to execute your code.

1. Interactive Mode

In this mode, Python executes code line by line immediately. Best for testing and learning.

>>> 5 + 3
8
>>> print("Hello")
Hello

2. Script Mode

In this mode, you write the full program in a file (.py) and then run it. Used for real-world projects.

Structure of a Python Program

A Python program follows a logical structure using the following components:

Core Components

# My first program
name = input("Enter name: ")
if name:
    print("Welcome", name) # Note the indentation

Installing Python

Follow these steps to set up Python on your system (Complete Setup).

Step 1: Download

Step 2: Verify Installation

Open your Command Prompt and type the following command:

python --version

If the version number appears, Python is installed successfully!

Setting up IDEs (PyCharm & VS Code)

An Integrated Development Environment (IDE) makes coding easier with tools for debugging and auto-completion.

1. Python in PyCharm

2. Python in VS Code

Quick Comparison Table

Comparing the two most popular environments for Python development.

FeaturePyCharmVS Code
Beginner Friendly⭐⭐⭐⭐⭐⭐⭐⭐⭐
Heavy ProjectsYes (Excellent)Yes
SpeedMediumFast
Built-in Python ToolsYesNeeds Extensions

Recommendation:

For students just starting their journey, PyCharm is highly recommended due to its specialized Python support.

What students Say?

Here are the stdudents...

#

Contact Us

Empower your tech dreams with us. Get in touch!

  • #
  • #
  • #
  • #
  • #