Back to Browse

L3—Python Virtual Environments & Variables | UV Setup, Data Types, Jupyter Notebook & F-strings

128 views
Mar 16, 2026
53:05

In Lecture 3 of the AI for Software Engineers series, Bipin Kumar writes the first real Python code — and sets up the professional project structure every AI developer uses. You'll create your first virtual environment, install packages blazing-fast with UV, and learn the core Python building blocks: variables, data types, and F-strings inside Jupyter Notebook. 🧠 Topics Covered in This Lecture: 🗂️ Virtual Environments: What is a virtual environment and why every project needs one (package conflicts explained) Three ways to create envs: conda, pip, uv — and why UV is the fastest (written in Rust!) Step-by-step: pip install uv → uv init → uv add pandas langchain numpy What files UV creates: pyproject.toml, main.py, .venv/, .python-version How to activate your environment: Mac/Linux: source .venv/bin/activate Windows (PowerShell): .venv\Scripts\Activate Windows (CMD): .venv\Scripts\activate.bat Installing packages mid-project: uv add fastapi — and verifying in pyproject.toml 📓 Jupyter Notebook Basics: Creating .ipynb files vs .py scripts — when to use each Cells — code vs markdown, running with Shift+Enter, the play button Run All, Restart Kernel, Clear All Output — what they do and when to use them Selecting the right kernel (your virtual env) for a notebook Using import and catching ModuleNotFoundError when a package isn't installed 🐍 Python Variables: What a variable is — a labelled memory box Creating variables: a = 16, name = "Rohit", pi = 3.14 Variable naming rules: ✅ Must start with a letter (a–z, A–Z) or underscore _ ❌ Cannot start with a number or special character ❌ Cannot use Python reserved keywords (for, while, break...) ⚠️ Case-sensitive: a and A are different variables Comments with # — how and why to use them 📊 Data Types: int — whole numbers: 16, 170, 920 float — decimals: 3.14, 82.78 str — text / strings: "Rohit", "Apple" list, tuple, dict — coming in Lecture 4! Using type() to check any variable's data type ✨ F-strings: Embed variables directly inside printed text f"My name is {name}" → My name is Rohit Why F-strings matter for GenAI prompt engineering ⏭️ Next Lecture (Lecture 4): 👉 Data Types Deep Dive — Lists, Tuples, Dictionaries, Arithmetic & Assignment Operators 📅 Class Schedule: Monday, Wednesday & Friday at 7:00 AM 3 classes per week | Total course: ~4–5 months 💬 Stuck on activating your virtual env? Drop your OS and error in the comments — Bipin replies! 📌 Subscribe & turn on notifications so you never miss a class. #PythonForBeginners #VirtualEnvironment #UV #JupyterNotebook #PythonVariables #DataTypes #Fstring #AIforEngineers #BipinKumar #LearnPython #GenerativeAI #PythonBasics #Miniconda #Pandas

Download

0 formats

No download links available.

L3—Python Virtual Environments & Variables | UV Setup, Data Types, Jupyter Notebook & F-strings | NatokHD