AI Programming in Python
This course is a comprehensive introduction to programming with Python, with a focus on applications in Artificial Intelligence. The site is bilingual — use the language switcher in the top bar to read in English or 中文.
How to use this site
Use the navigation menu on the left to move through the chapters. Most code on the pages is live — press Run to execute it in your browser, edit it, and run again. Use the search box (top right) to jump to any topic.
Course Contents
Chapter 1 — Python Basics
Chapter 2 — Functions
- 2.1 Defining Functions
- 2.2 Namespaces and Scope
- 2.3 First-Class Objects
- 2.4 Use Cases
- 2.5 Loose Ends and Style
Exercises
More chapters are being rewritten and will appear here as they are ready.
Tools
- 🎙️ Live Lecture Translator (English → 中文) — real-time captions for English lectures, running entirely in your browser. Open it on the teaching computer, click Start, and project the Chinese captions.
© 2025–2026 Guoliang Ma (马国良) · All rights reserved. See the Copyright page for terms of use.