Skip to content

About

Learn Python from zero, then understand the AI vocabulary behind ChatGPT and Claude: notebooks, whiteboard notes, assignments and a 21-term AI guide.

Resources

Contributing

Stars

37 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Python AI Crash Course

Watch on YouTube Python License

Learn Python from zero, then understand the AI vocabulary behind tools like ChatGPT and Claude. This repository holds every note, notebook and practice file for the 13-hour course.

🧭 New to AI? Follow the roadmap for the best order to learn Python and AI from scratch.

Course video

Contents

What you will learn

Python: install Python and Jupyter, variables and data types, strings and slicing, operators, if/else decisions, loops, lists, tuples, sets and dictionaries, functions up to lambda, map, filter and reduce, plus exception handling and object-oriented programming.

AI concepts: 21 core terms in 5 stages, from LLM, prompting and temperature through tokens, attention and transformers, to RAG, MCP, agents and reasoning models.

Who it is for: complete beginners. You need a computer and curiosity, nothing else.

Start here

  1. Watch the course on YouTube. Use the chapter links below to jump to a topic.
  2. Get the files: click Code, then Download ZIP (or use git clone).
  3. Set up Python and Jupyter (below), then open the lesson folder that matches the chapter.
  4. Not sure where to begin? Follow the roadmap.

Set up in five minutes

You need Python 3.9 or newer.

git clone https://github.com/mayank953/python-ai-crash-course.git
cd python-ai-crash-course
python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter lab

Prefer Anaconda? Install it (shown at 20:31 in the video), run jupyter notebook in the repo folder and open any .ipynb. No install at all? Upload a notebook to Google Colab. The notebooks only use the Python standard library.

How each lesson works

Every lesson folder in python/ follows the same pattern:

Step File What to do
1 Video Watch the chapter (timestamps are linked in each lesson).
2 πŸ“„ whiteboard-notes.pdf The notes drawn during the lesson. Skim before or after the video.
3 πŸ“˜ theory.ipynb A written explanation with small examples. Read it.
4 πŸ’» code.ipynb The code from class. Run it and change the values to see what happens.
5 ✏️ exercises*.ipynb Practice questions (where available).
6 🎯 Try it yourself Three small tasks in each lesson README.
7 🎯 Checkpoint assignment At the end of every section, with automatic checks.

Each notebook starts with a banner linking to its video chapter, so the reference is always one click away.

Course outline

Topic Video range
Python setup & basics 0:00 to 51:57
Data types, strings & type casting 51:57 to 2:15:50
Operators & string formatting 2:15:50 to 3:28:43
Conditionals & loops 3:28:43 to 5:33:56
Data structures 5:33:56 to 8:41:36
Functions & functional programming 8:41:36 to 10:47:48
AI concepts explained (21 terms) 10:47:48 to 13:01:38

Chapter overview

All 96 chapters of the video, with the place in this repository that matches each one.

Show the full chapter table
Time Chapter In this repo
0:00 Intro: Master Python + AI Lesson 01
2:38 Why Do We Need Programming? Lesson 01
6:45 What Is Python & Where It's Used Lesson 01
11:10 Key Features of Python Lesson 01
14:22 Installing Python Lesson 02
16:18 Running Python in Terminal & IDLE Lesson 02
20:31 Anaconda & Jupyter Notebook Setup Lesson 02
29:18 Built-in Functions & print() Lesson 03
35:42 Python Modules (math, import) Lesson 03
38:20 Errors: Syntax vs Runtime Lesson 03
43:59 Identifiers & Naming Rules Lesson 03
51:57 Data Types & Integers Lesson 04 Β· Lesson 05
1:00:14 Float Data Type Lesson 05
1:03:13 Complex Numbers Lesson 05
1:06:20 Boolean Data Type Lesson 06
1:12:28 Strings Basics Lesson 07
1:19:04 String Indexing Lesson 08
1:23:35 Negative Indexing Lesson 08
1:27:35 String Concatenation & Repetition Lesson 09
1:33:40 String Slicing Lesson 09
1:50:14 Slicing with Step Value Lesson 09
2:01:13 Type Conversion: Implicit Lesson 10
2:07:12 Explicit Type Casting Lesson 10
2:15:50 Operators in Python: Overview Lesson 11
2:17:59 Arithmetic Operators Lesson 11
2:26:08 Relational Operators Lesson 12
2:43:46 Logical Operators Lesson 13
2:53:03 Assignment Operators Lesson 13
2:58:11 Identity Operators (is vs ==) Lesson 13
3:06:08 Operator Precedence & Associativity Lesson 15
3:13:46 String Formatting Lesson 16
3:25:07 Python f-Strings Lesson 16
3:28:43 Decision Control & if Statement Lesson 17
3:41:17 if-else Statement Lesson 18
3:47:03 elif Ladder Lesson 18
3:56:24 Nested if Statements Lesson 19
4:04:18 Conditionals: Practice Questions Lesson 20
4:19:50 while Loop Lesson 21
4:30:49 break Statement Lesson 22
4:37:52 continue Statement Lesson 22
4:45:36 pass Statement Lesson 22
4:48:36 for Loop Lesson 23
5:00:29 range() Function Lesson 24
5:15:08 for Loop with range() Lesson 24
5:20:55 Nested Loops Lesson 25
5:33:56 Intro to Data Structures Lesson 26
5:43:37 Lists in Python Lesson 27
5:54:24 List Operations Lesson 27
6:01:49 Built-in List Functions Lesson 28
6:14:35 List Methods Lesson 28
6:28:20 Copying Lists Lesson 28
6:33:38 List Comprehension Lesson 29
6:48:42 Tuples Lesson 30 Β· Lesson 31
7:18:01 Sets Lesson 32
7:28:17 Set Operations Lesson 33
7:48:58 Dictionaries Lesson 34
8:02:44 Dictionary Operations & Methods Lesson 35
8:19:30 Strings Revisited: ord() & chr() Lesson 36
8:26:41 String Methods Lesson 36
8:41:36 Defining Your Own Function Lesson 37 Β· Lesson 38
8:48:01 Return vs Void Functions Lesson 37 Β· Lesson 38
8:59:32 Functions: Core Concepts Lesson 37 Β· Lesson 38
9:10:11 Positional Arguments Lesson 39
9:13:32 Default Arguments Lesson 39
9:28:51 Variable-Length Arguments (*args) Lesson 40
9:33:05 Keyword Arguments (**kwargs) Lesson 40
9:40:20 Variable Scope: Local vs Global Lesson 41
9:56:08 Functions as First-Class Citizens Lesson 42
10:22:04 Lambda Functions Lesson 43
10:32:38 map() Function Lesson 44
10:37:07 filter() Function Lesson 44
10:43:06 reduce() Function Lesson 44
10:47:48 Python Wrap-Up & AI Section Intro AI concepts overview
10:52:08 Large Language Models (LLMs) Large Language Model (LLM)
10:58:07 Prompting Prompting
11:01:57 Temperature Temperature
11:07:43 AI Hallucination Hallucination
11:12:19 Context Engineering Context Engineering
11:17:22 Tokens & Token Costs Tokens
11:26:22 Vectors & Embeddings Vectors & Embeddings
11:31:37 Context Window Context Window
11:39:49 Model Parameters Model Parameters
11:46:56 Attention Mechanism Attention Mechanism
11:52:46 Transformers Transformer
12:04:37 How LLMs Learn: Pretraining Pretraining
12:08:10 Fine-Tuning Fine-Tuning
12:11:31 RLHF RLHF
12:16:08 RAG (Retrieval-Augmented Generation) RAG: Retrieval-Augmented Generation
12:26:47 MCP (Model Context Protocol) MCP: Model Context Protocol
12:38:47 AI Agents AI Agents
12:45:49 Multimodal AI Multimodal AI
12:48:15 Reasoning Models Reasoning Models
12:52:07 Small Language Models Small Language Models
12:54:10 AGI vs ASI AGI vs ASI
12:56:47 Recap: How It All Connects Recap
12:59:03 Final Thoughts Final thoughts

Python: Complete All Resources

πŸ“„ whiteboard notes (PDF) Β· πŸ“˜ theory notebook Β· πŸ’» code notebook Β· ✏️ exercises

Hover over an icon to see what it is. Each lesson title opens its own page with timestamps and tasks.

Setup & Basics

# Lesson Video Files
01 Introduction to Python 0:00 πŸ“„
02 Installing Python & Setting Up Jupyter 14:22 πŸ“„ πŸ’»
03 Built-in Functions, print(), Modules, Errors & Identifiers 29:18 πŸ“˜ πŸ’»

Data Types, Strings & Type Casting

# Lesson Video Files
04 Data Types 51:57 πŸ“„ πŸ“˜ πŸ’»
05 Numeric Types: int, float, complex 51:57 πŸ“„ πŸ“˜ πŸ’»
06 Boolean Data Type 1:06:20 πŸ“„ πŸ“˜ πŸ’»
07 Strings Basics 1:12:28 πŸ“„ πŸ“˜ πŸ’»
08 String Indexing (Positive & Negative) 1:19:04 πŸ“„ πŸ“˜ πŸ’»
09 Concatenation, Repetition & Slicing 1:27:35 πŸ“„ πŸ’» πŸ’»
10 Type Conversion & Type Casting 2:01:13 πŸ“„ πŸ“˜ πŸ’»

Operators & String Formatting

# Lesson Video Files
11 Operators Overview & Arithmetic Operators 2:15:50 πŸ“„ πŸ“˜ πŸ’»
12 Relational Operators 2:26:08 πŸ“„ πŸ“˜ πŸ’»
13 Logical, Assignment & Identity Operators 2:43:46 πŸ“„ πŸ“˜ πŸ’»
14 Membership & Binary (Bitwise) Operators β€” πŸ“„ πŸ“˜ πŸ’»
15 Operator Precedence & Associativity 3:06:08 πŸ“„ πŸ’»
16 String Formatting & f-Strings 3:13:46 πŸ“„ πŸ“˜ πŸ’»

Conditionals & Loops

# Lesson Video Files
17 Decision Control & the if Statement 3:28:43 πŸ“„ πŸ“˜ πŸ’»
18 if-else & the elif Ladder 3:41:17 πŸ“„ πŸ’»
19 Nested if Statements 3:56:24 πŸ“„ πŸ“˜ πŸ’»
20 Conditionals: Practice Questions 4:04:18 πŸ“„ ✏️ ✏️
21 Introduction to Loops & the while Loop 4:19:50 πŸ“˜ πŸ’»
22 break, continue & pass 4:30:49 πŸ“˜ πŸ’»
23 The for Loop 4:48:36 πŸ’»
24 The range() Function 5:00:29 πŸ’»
25 Nested Loops 5:20:55 πŸ’»

Data Structures

# Lesson Video Files
26 Introduction to Data Structures 5:33:56 πŸ“„ πŸ“˜
27 Lists: Basics & Operations 5:43:37 πŸ“„ πŸ’»
28 List Functions, Methods & Copying 6:01:49 πŸ“„ πŸ“˜ πŸ’»
29 List Comprehension 6:33:38 πŸ“„ πŸ“˜ πŸ’»
30 Tuples 6:48:42 πŸ“„ πŸ’»
31 Tuple Functions & Methods 6:48:42 πŸ“„ πŸ’»
32 Sets 7:18:01 πŸ“„ πŸ’»
33 Set Operations, Functions & Methods 7:28:17 πŸ“„ πŸ’»
34 Dictionaries 7:48:58 πŸ“„ πŸ’»
35 Dictionary Operations & Methods 8:02:44 πŸ“„ πŸ’»
36 Strings Revisited: ord(), chr() & String Methods 8:19:30 πŸ“„ πŸ’»

Functions & Functional Programming

# Lesson Video Files
37 Introduction to Functions 8:41:36 πŸ“„ πŸ’»
38 Defining Your Own Functions 8:41:36 πŸ“„ πŸ’»
39 Types of Arguments: Positional & Default 9:10:11 πŸ“„ πŸ“˜ πŸ’»
40 *args and **kwargs 9:28:51 πŸ“„ πŸ’»
41 Variable Scope: Local vs Global 9:40:20 πŸ“„ πŸ’»
42 Functions as First-Class Citizens 9:56:08 πŸ“„ πŸ’»
43 Lambda Functions 10:22:04 πŸ“„ πŸ“˜ πŸ’»
44 map(), filter() & reduce() 10:32:38 πŸ“„ πŸ’»

Error Handling & OOP

# Lesson Video Files
45 Exception Handling β€” πŸ“„ πŸ“˜ πŸ’» πŸ’» ✏️
46 Object-Oriented Programming β€” πŸ“„ πŸ’» πŸ’» πŸ’» πŸ’» πŸ“˜ πŸ’» πŸ’» ✏️ ✏️

Checkpoint assignments

Test yourself at the end of every section. Each problem has a check cell that tells you instantly whether you got it right.

Checkpoint After lessons Problems Starter Solutions
Setup & Basics Lessons 01 to 03 5 notebook solutions
Data Types, Strings & Type Casting Lessons 04 to 10 5 notebook solutions
Operators & String Formatting Lessons 11 to 16 5 notebook solutions
Conditionals & Loops Lessons 17 to 25 5 notebook solutions
Data Structures Lessons 26 to 36 6 notebook solutions
Functions & Functional Programming Lessons 37 to 44 6 notebook solutions

AI Concepts

The second half of the course explains 21 AI terms in 5 stages. There is no code; the goal is to understand the language of AI. Everything lives in ai-concepts/: one card per term from the course diagram, a short explanation, a hands-on activity, a quiz, and the full diagram as a PDF.

The Complete AI Vocabulary map

Stage Terms
1. What You Already Use Large Language Model (LLM), Prompting, Temperature, Hallucination, Context Engineering
2. Under the Hood Tokens, Vectors & Embeddings, Context Window, Model Parameters, Attention Mechanism, Transformer
3. How It Learns Pretraining, Fine-Tuning, RLHF
4. Getting Smarter Without Retraining RAG: Retrieval-Augmented Generation, MCP: Model Context Protocol
5. Beyond Chat AI Agents, Multimodal AI, Reasoning Models, Small Language Models, AGI vs ASI, Recap: How It All Connects

Resources explained

The video uses a handful of tools and articles. Here is what each one is and when to use it (step-by-step guides are in the AI section).

Resource What it is Use it for Chapter
AI Terms Explained (interactive site) A glossary site that explains the AI terms from this course in everyday language. All 21 terms 10:47:48
OpenAI Tokenizer A tool from OpenAI that shows exactly how a piece of text is cut into tokens and how many there are. Tokens 11:17:22
Temperature & Top-K Visualizer A visualizer built on real next-word probabilities from a small open model (Gemma 3 1B). It shows the ten most likely next tokens as a chart. Temperature 11:01:57
Ars Technica: Air Canada must honor refund policy invented by airline's chatbot A news report on a 2024 case where an airline was held to a refund policy that its own chatbot had invented. A real example of why hallucinations matter. Hallucination 11:07:43
Prompt & Context Engineering (interactive) Your own companion site, the Prompt Engineering Masterclass: a place to go deeper on writing prompts and building context. Prompting, Context Engineering 10:58:07
Transformer Explainer (Polo Club) An interactive tool that runs a small GPT-2 model right in your browser so you can watch embeddings, attention and next-word probabilities happen live. Attention, Transformer 11:52:46
OpenAI: Previewing GPT-5.6 An OpenAI announcement page linked in the video, useful as an example of how a lab presents a new model. LLMs 10:52:08

Some of these sites block automated link checkers. If one does not open, search for its title.

Repository layout

python-ai-crash-course/
β”œβ”€β”€ README.md                 you are here
β”œβ”€β”€ INDEX.md                  every file and link in one table
β”œβ”€β”€ requirements.txt          jupyterlab
β”œβ”€β”€ roadmap/
β”‚   └── README.md             the beginner roadmap for learning Python and AI
β”œβ”€β”€ python/
β”‚   β”œβ”€β”€ README.md             lesson list with summaries
β”‚   └── NN-topic/             one folder per lesson
β”‚       β”œβ”€β”€ README.md         timestamps, files, tasks
β”‚       β”œβ”€β”€ whiteboard-notes.pdf
β”‚       β”œβ”€β”€ theory.ipynb
β”‚       └── code.ipynb
β”œβ”€β”€ assignments/              six checkpoint assignments
β”‚   └── solutions/
β”œβ”€β”€ ai-concepts/
β”‚   β”œβ”€β”€ README.md             21 terms, activities, resources, quiz
β”‚   β”œβ”€β”€ ai-terms-explained.pdf
β”‚   └── images/
└── scripts/                  maintainer tooling (learners can ignore)

The complete list of files and links is in INDEX.md. The repo holds 93 notebooks and scripts and 41 PDFs.

FAQ

A notebook looks odd on GitHub. Download the repo and open it locally with Jupyter for the best experience.

python is not found. On macOS and Linux use python3. On Windows try py.

Which file do I open first in a lesson? Watch the video, then theory.ipynb, then code.ipynb.

Do I need an AI account for the AI concepts? No. The activities work with any free chatbot, and the tools are free websites.

I got stuck or found a mistake. Open an issue with the lesson number and what happened.

Contributing

Corrections and clearer explanations are welcome. See CONTRIBUTING.md.

License

Released under the MIT License. Created by Mayank Aggarwal. If this helped you, star the repo and share the video with a friend who is starting out.

About

Learn Python from zero, then understand the AI vocabulary behind ChatGPT and Claude: notebooks, whiteboard notes, assignments and a 21-term AI guide.

Resources

Contributing

Stars

37 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages