Python Getting Started

🐍 Python – Getting Started

Before writing Python programs, you need to:

  1. Install Python

  2. Set up an editor or IDE

  3. Run your first Python program


🧩 Step 1: Install Python

✔ Go to the official website:

👉 https://www.python.org/downloads/ (don’t click here — just for reference)

✔ Download the latest version (recommended: Python 3.x).

✔ During installation, make sure to enable the checkbox:

🔧 “Add Python to PATH”

This makes Python available from the command line.


🧩 Step 2: Choose an IDE / Code Editor

You can write Python code in any editor. Popular choices:

Editor / IDE Best For
IDLE (comes with Python) Beginners
VS Code Most recommended
PyCharm Professional development
Jupyter Notebook Data science & Machine learning

🧩 Step 3: Check Python Version

Open Command Prompt (Windows) or Terminal (Mac/Linux) and type:

python --version

or

python3 --version

You’ll see something like:

Python 3.12.1

🧩 Step 4: Run Python

There are two ways to run Python programs:


▶️ Method 1: Using Python Interactive Shell (REPL)

Type:

python

Then type code:

print("Hello Python!")

Output:

Hello Python!

▶️ Method 2: Using a .py File

  1. Open your editor

  2. Type code:

print("Welcome to Python!")
  1. Save it as: first_program.py

  2. Run it using command:

python first_program.py

Output:

Welcome to Python!

🧠 Python File Structure

A Python script normally contains:

✔ Comments
✔ Variables
✔ Logic
✔ Functions

Example:

# This is my first Python script
name = "Vipul"
print("Hello", name)

⚙️ Install Useful Python Packages

Using pip (Python package manager):

pip install pandas
pip install flask
pip install numpy

🎉 Congratulations!

If you’ve reached here, you’re ready to start programming in Python. 🚀

CodeCapsule

Sanjit Sinha — Web Developer | PHP • Laravel • CodeIgniter • MySQL • Bootstrap Founder, CodeCapsule — Student projects & practical coding guides. Email: info@codecapsule.in • Website: CodeCapsule.in

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *