Intermediate Python
Write interactive Python programs that ask questions, clean up text, handle errors, process data files, call real APIs, and model games with classes.
Start learning
Build real skills one lesson at a time
Explore the complete curriculum below, then start with the lesson that is right for you.
About this course
Knowing Python's basics and building a program someone can use are two different things. This course closes that gap. You write programs that ask questions and check the answers, remember things between runs, and pull live data from the internet without crashing when something goes wrong.
Every lesson teaches one tool, and every chapter ends with a program you run and play. You build a game of Hangman, a trivia night on live questions, and a text adventure built on your own classes. Everything runs in the browser, so there is nothing to install.
What you'll learn
- Input and output: asking questions with
input(), re-asking until an answer is valid, and lining up what prints - Working with text: cleaning, searching, and reshaping strings
- Collections: tuples and sets, plus looping with
enumerate()andzip() - Comprehensions: building lists and dictionaries in one line
- Functions: keyword arguments,
*argsand**kwargs, and sorting withkey=andlambda - Modules and packages: splitting a program across files and folders
- Errors and exceptions: reading a traceback, catching errors with
try, and raising your own - Files: reading and writing text, CSV, and JSON
- Data tools: counting with
Counterand doing date math withdatetime - APIs: fetching and sending data with
requests, and handling a request that fails - Classes: class attributes, inheritance with
super(), and dataclasses
Prerequisites
- The Python basics: you can write a function, loop over a list, and read values from a dictionary. Python For Beginners (opens in a new tab) covers all of it.
Course instructor
Brad Traversy
Founder of Traversy Media and an educator known for practical, project-focused web development courses.
Course content
- 1.1. WelcomeVideo
- 1.2. Asking questions with input()20XPCoding
- 1.3. Converting input with int() and float()20XPCoding
- 1.4. Formatting numbers with format specs20XPCoding
- 1.5. Lining up columns with width and alignment20XPCoding
- 1.6. Re-asking until the answer is valid50XPCoding
- 1.7. Project: Cinema Tickets100XPCoding
- 1.8. Knowledge check20XPQuiz
Keep learning
More programming courses
Intermediate course
Vue.js Fundamentals
Build real Vue apps from scratch. Learn single-file components, template syntax, reactivity with ref and computed, props and events, forms with v-model, data fetching, composables, and routing, then put it all together in an anime explorer capstone. Assumes you have finished JavaScript Basics and Intermediate JavaScript.
View courseAdvanced course
Software Design Principles in JavaScript
Learn to structure code that survives change: separation of concerns, coupling and cohesion, SOLID, composition, dependency injection, and the patterns worth knowing, all applied to real JavaScript you restructure yourself.
View courseBeginner course
Learn Git
Understand Git through short terminal drills and a live view of the working tree, staging area, branches, and history.
View course

