Day 1: Introduction to Python - Detailed Walkthrough

 


Day 1: Introduction to Python - Detailed Walkthrough

Rey, welcome to Day 1 of our 50-day Python journey! Ee roju basics start chestunnam – Python enduku learn cheyali, ela install cheyali, first program run cheyali, and simple IDE setup. Ee walkthrough ni step-by-step ga follow chey, 1-2 hours lo complete avtundi.

Step 1: Why Python? (Theory - 10-15 mins)

Python is one of the most popular programming languages today. Here's why it's great for beginners to advanced users:

  • Simple and Readable: Syntax is clean, almost like English. Example: To print something, just print("Hello") – no complex setups.
  • Versatile: Used for web development (Django/Flask), data science (Pandas, NumPy), AI/ML (TensorFlow, PyTorch), automation, games, and more.
  • Huge Community: Tons of libraries (pre-built code) and free resources. As per recent stats (2025), Python tops GitHub and Stack Overflow trends.
  • Cross-Platform: Works on Windows, macOS, Linux.
  • Job Opportunities: High demand in tech jobs – average salary for Python devs is around $120K+ in US, and growing in India/globally.
  • Fun Fact: Created by Guido van Rossum in 1991, now maintained by Python Software Foundation.

Action: Read this quick intro article: GeeksforGeeks: Introduction to Python. It covers history, features, and applications in 5-10 mins.

Step 2: Install Python (3.12+ Version) (15-20 mins)

We need the latest stable version (as of Oct 21, 2025, Python 3.12 or 3.13 is recommended – check for updates). Download from official site to avoid issues.

Steps:

  1. Go to python.org/downloads.
  2. Download the installer for your OS:
    • Windows: Click "Download Python 3.13.x" (or latest). Run the .exe file. Important: Check "Add python.exe to PATH" during installation.
    • macOS: Download the .pkg file. Run it, follow prompts. macOS might have pre-installed Python 2/3, but install fresh for latest.
    • Linux (Ubuntu/Debian): Open terminal and run: sudo apt update && sudo apt install python3 python3-pip. For other distros, use package manager (e.g., yum for Fedora).
  3. Verify installation: Open terminal/Command Prompt.
    • Type python --version or python3 --version. It should show "Python 3.12.x" or higher.
    • If not, restart terminal or check PATH environment variable.

Troubleshooting:

  • If multiple versions, use python3 instead of python.
  • On Windows, if PATH issue: Search "Environment Variables" in Start menu, add Python's install path (e.g., C:\Python312) to System PATH.
  • Test: Type python in terminal to enter REPL (interactive mode). Type print("Hello") and hit Enter – it should output "Hello". Exit with exit().

If you're on a restricted system, use online interpreters like Replit or Google Colab for now, but local install is better for practice.

Step 3: Setup IDE - Visual Studio Code (VS Code) (10-15 mins)

Python works in any text editor, but VS Code is free, powerful, and beginner-friendly with auto-complete, debugging.

Steps:

  1. Download from code.visualstudio.com.
  2. Install it (simple wizard).
  3. Open VS Code.
  4. Install Python extension: Click Extensions icon (sidebar), search "Python" by Microsoft, install it.
  5. Create a new file: File > New File, save as hello.py (use .py extension).
  6. Configure: In VS Code, open Command Palette (Ctrl+Shift+P), type "Python: Select Interpreter", choose your installed Python version.

Why VS Code? Integrates with Git, has terminal inside, and extensions for linting (code checks).

Alternative: If you prefer simple, use IDLE (comes with Python) or PyCharm Community (free but heavier).

Step 4: Run Your First "Hello World" Program (10 mins)

This is your first code!

  1. In VS Code, open hello.py.
  2. Write this code:
    python
    print("Hello, World!")
  3. Save the file.
  4. Run it:
    • In VS Code: Right-click file > "Run Python File in Terminal".
    • Or, open terminal in VS Code (Terminal > New Terminal), navigate to file folder (e.g., cd Desktop), then python hello.py (or python3 hello.py).
  5. Output: You should see "Hello, World!" in terminal.

Understanding the Code:

  • print() is a built-in function to output text.
  • Strings are in quotes (" ").
  • No semicolons or braces – Python uses indentation (spaces/tabs) for structure.

Step 5: Practice Exercise (15-20 mins)

Build on Hello World: Write a script that prints your name and age.

  1. Create intro.py in VS Code.
  2. Code:
    python
    name = "YourNameHere"  # Replace with your name
    age = 25  # Replace with your age
    print("Rey, naa peru", name, "mariyu naa vayasu", age, "years!")
  3. Run it in terminal: python intro.py.
  4. Output example: "Rey, naa peru Ram mariyu naa vayasu 25 years!"

Extensions to Try:

  • Use input: Add name = input("Enter your name: ") to make it interactive.
  • Format better: Use f-strings (Python 3.6+): print(f"Rey, naa peru {name} mariyu naa vayasu {age} years!").

Tips:

  • Errors? Check spelling, quotes, indentation.
  • Practice in REPL: Type python in terminal, experiment directly.

Wrap-Up for Day 1

Congrats, rey! You installed Python, set up IDE, ran code. Ee basics strong ga unte, next days easy. Track your progress: Note what you learned in a journal. Resources lo suggested YouTube video chudu: Search "Python for Beginners freeCodeCamp" on YouTube, first 30 mins (intro part).

Comments

Post a Comment

Popular Posts