Start with Python's building blocks
Welcome to CS50P
See the shape of the course and what it means to solve problems with Python.
Visual note · Lesson 2Returning a value is not printing it
About this course
This chapter
Learn the ideas every Python program uses to make decisions and repeat work.
By the end of the course you can build
- Write small Python programs with variables, functions, and control flow
- Handle errors, work with files, and use third-party libraries
- Test code and extract useful data with regular expressions
- Model real-world ideas with classes and object-oriented programming
Treat each lecture as a lab. Pause after a concept, write a tiny program without copying it, and keep one question to revisit in the next chapter.