Ads
Free course

CS50’s Introduction to Programming with Python

A comprehensive introduction to programming with Python from Harvard's CS50, covering core concepts from functions and variables to object-oriented programming and regular expressions. The course builds foundational skills through loops, conditionals, exception handling, file...

10 lessons 15h 49min total

Course overview

This course provides a thorough introduction to programming using Python, based on Harvard University's CS50P curriculum. It guides you from the absolute basics, starting with functions, variables, and data types, and progresses through essential control flow concepts like conditionals and loops. You will learn to write robust code with exception handling, leverage the power of Python libraries, and implement automated unit tests. The journey continues with file input and output, object-oriented programming principles including classes and inheritance, and a deep dive into regular expressions for pattern matching. The final module covers advanced language features such as list comprehensions and type hints to refine your coding practice.

Who this course is for

This course is designed for absolute beginners with no prior programming experience, as well as learners looking to formalize their understanding of Python. It serves as an ideal starting point for students, professionals transitioning to tech, or self-taught programmers who want a rigorous, computer-science-oriented foundation. The content is structured to build knowledge sequentially, making it suitable for anyone who is comfortable with basic computer operations and is ready to engage with systematic, lecture-based learning.

How to study this sequence

The course is structured as a linear sequence, with each of the ten lectures building directly on the previous one. Begin with Week 0 on functions and variables, as establishing a solid mental model for these foundations is critical before moving to conditionals and loops. Work through the content sequentially, write and test the code shown in the demonstrations, and experiment by modifying the examples. Pay special attention to the unit testing and exceptions lectures, as these introduce professional practices that will immediately improve the reliability of your code in subsequent projects.

What you should be able to do

Upon completing this course, you will be able to write, test, and debug procedural and object-oriented Python programs. You will have practical experience reading and writing files, parsing data formats like CSV, working with third-party libraries, and applying regular expressions. The outcome is a durable, transferable programming foundation that prepares you to explore web development, data science, or automation with Python.

~/about-course

What you learn in this Python course

This course organizes 10 Python lessons in a practical order, starting with the base and moving toward examples you can repeat in your own projects.

The main practice points are Understand how functions work, accept arguments, and return values in Python, Create and assign variables while recognizing different data types and type conversion, Format strings using f-strings and apply built-in string methods for text manipulation and Set up a Python development environment and use debugging techniques to fix errors. Use this page to review the course proposal, check the key topics, and open the lessons in the recommended order.

What you will practice

  • Understand how functions work, accept arguments, and return values in Python
  • Create and assign variables while recognizing different data types and type conversion
  • Format strings using f-strings and apply built-in string methods for text manipulation
  • Set up a Python development environment and use debugging techniques to fix errors
  • Define custom functions with multiple parameters and understand variable scope
  • Perform numeric operations and apply proper code style and documentation practices

Concepts covered

Functions Variables Data types Type conversion Scope String formatting Return values Arguments

Course lessons

10 tutoriais organizados em sequência.

~/course-summary

Course summary

This Python course brings together 10 lessons in a guided sequence. It starts with "Python Functions and Variables – CS50P Week 0" and moves step by step, so each lesson supports the next one and helps turn the topic into practice.

During the course, the practical focus is on Understand how functions work, accept arguments, and return values in Python, Create and assign variables while recognizing different data types and type conversion, Format strings using f-strings and apply built-in string methods for text manipulation and Set up a Python development environment and use debugging techniques to fix errors. These points help you watch with a goal instead of treating the lesson as a loose introduction.

The course also introduces important ideas such as Functions, Variables, Data types, Type conversion and Scope, which makes it easier to understand later tutorials and decide when each resource is useful.

~/study-plan

How to get more from this course

Who this Python course is for

This course is useful for anyone who wants a direct introduction to Python before moving into longer studies. It works especially well when you want to understand the subject through organized lessons instead of scattered searches.

What you can do after finishing

By the end, you should be able to review the main idea of the course and practice Understand how functions work, accept arguments, and return values in Python, Create and assign variables while recognizing different data types and type conversion, Format strings using f-strings and apply built-in string methods for text manipulation and Set up a Python development environment and use debugging techniques to fix errors with more confidence.

Recommended study order

Watch the 10 lessons in the order shown on this page. Pause after each lesson to repeat the examples and only move on when the previous step makes sense.

What to study next

After finishing the course, explore the Python topic to find related tutorials and keep studying with more context.

~/course-faq

Course questions

Is this Python course for beginners?

Yes. The course is presented as an entry point for Python and can be used before moving into more advanced tutorials.

How many lessons are in this course?

This course currently has 10 lessons and about 15h 49min in total.

What should I do after finishing the course?

The best next step is to explore the Python topic and choose a related tutorial that matches what you want to practice.

Is this course free?

Yes. This is a free course organized by CursoB so you can study Python in a structured sequence.

Do I need previous experience to follow the course?

You do not need advanced experience. The course starts from the main ideas of Python and moves through the lessons step by step.

Should I watch the lessons in order?

Yes. The recommended path is to watch the 10 lessons in the order shown, because each lesson helps prepare the next one.

Can I use this course for practical projects?

Yes. Use the course as a practical reference to train Understand how functions work, accept arguments, and return values in Python, Create and assign variables while recognizing different data types and type conversion, Format strings using f-strings and apply built-in string methods for text manipulation and Set up a Python development environment and use debugging techniques to fix errors and adapt the examples to your own projects.

Does this course include a certificate?

CursoB stopped issuing certificates for its own courses in May 2026. CursoB no longer offers completion certificates. Courses and tutorials remain free to study. If content is hosted on another platform, any certificate depends exclusively on the original author or platform rules.

Are the lessons updated?

CursoB periodically reviews the Python catalog and may add, remove, or reorder lessons when better content is found.

Where can I find more content on this subject?

Explore the Python topic to find related tutorials and complementary courses.

~/lesson-notes

What each course lesson covers

Use these notes to understand the sequence before opening each lesson.

  1. 01 Python Functions and Variables – CS50P Week 0 In this lesson, you practice Understand how functions work, accept arguments, and return values in Python, Create and assign variables while recognizing different data types and type conversion and Format strings using f-strings and apply built-in string methods for text manipulation.
  2. 02 Python Conditionals – CS50P Week 1 In this lesson, you practice Understand if, elif, and else statements for multi-way branching, Apply Boolean operators (and, or, not) to combine multiple conditions and Implement comparison operators and chaining for range checks.
  3. 03 Python Loops – CS50P Week 2 In this lesson, you practice Understand while loops and when to use condition-based repetition, Master for loops for iterating through sequences and collections and Implement input validation using loops to ensure data quality.
  4. 04 Python Exceptions – CS50P Week 3 In this lesson, you practice Distinguish between different exception types like ValueError, SyntaxError, and NameError, Implement try-except blocks to catch and handle runtime errors gracefully and Build input validation loops using try-except with break statements.
  5. 05 Python Libraries – CS50P Week 4 In this lesson, you practice Understand the difference between modules, libraries, and packages, Use import and from statements to load Python functionality and Work with built-in modules like random and statistics.
  6. 06 Python Unit Tests – CS50P Week 5 In this lesson, you practice Write and execute unit tests using Python assertions, Use pytest framework for automated test discovery and execution and Test edge cases and exception handling in Python functions.
  7. 07 Python File I/O – CS50P Week 6 In this lesson, you practice Open, read, write, and close files using Python's file handling mechanisms, Use the with statement for proper resource management and error handling and Parse and process comma-separated values with the csv library.
  8. 08 Python Regular Expressions – CS50P Week 7 In this lesson, you practice Understand regular expression syntax and metacharacters for pattern matching, Apply regex functions like re.search(), re.match(), and re.fullmatch() correctly and Validate data formats such as email addresses and phone numbers using patterns.
  9. 09 Python Object-Oriented Programming – CS50P Week 8 In this lesson, you practice Understand the core principles of object-oriented programming and their advantages over procedural approaches, Create and instantiate classes while implementing constructors and instance methods and Apply inheritance to build class hierarchies and promote code reuse across related entities.
  10. 10 Python Et Cetera – CS50P Week 9 In this lesson, you practice Understand and use sets for unique collections and efficient membership testing, Apply type hints and mypy for static type checking in Python and Write clear docstrings that document functions, parameters, and return values.