Beginner
18 lessons
Python Programming for Beginners
Learn Python from zero. Understand how to write real programs, work with data, build useful tools, and think like a programmer. No experience needed.
Lessons
Work through these in order for the best experience.
01
~20 min
02
~17 min
03
~21 min
04
~19 min
05
~21 min
06
~23 min
07
~19 min
08
~22 min
09
~26 min
10
~22 min
11
~19 min
12
~21 min
13
~18 min
14
~23 min
15
~21 min
16
~19 min
17
~21 min
18
~20 min
What is Python and Why Learn It?
Understand what Python is, why it is one of the most popular languages in the world, and what you can build with it.
Setting Up Python on Your Computer
Install Python and a code editor on Windows, Mac, or Linux so you are ready to write and run your first programs.
Variables and Data Types
Learn how to store information in variables and understand the different types of data Python works with.
Comments in Python
Learn what comments are, how to write them, and why writing good comments makes you a better programmer.
Numbers and Math Operations
Learn how to do calculations in Python, work with different types of numbers, and understand operator precedence.
Working with Strings
Learn how to create, combine, format, and manipulate text in Python.
Getting Input from the User
Learn how to ask the user for information, read what they type, and use it in your program.
Making Decisions with If Statements
Learn how to make your programs act differently based on different conditions using if, elif, and else.
Loops: Repeating Actions
Learn how to use for loops and while loops to repeat code automatically instead of writing it out over and over.
Lists
Learn how to store multiple values in a single variable using lists, and how to add, remove, and access items.
Dictionaries
Learn how to store data as key-value pairs using dictionaries, one of the most useful data structures in Python.
Functions
Learn how to write reusable blocks of code called functions to organize your programs and avoid repeating yourself.
Working with Files
Learn how to read data from files and write data to files so your programs can store information permanently.
Error Handling
Learn how to handle errors and exceptions gracefully so your programs do not crash unexpectedly.
Modules and Imports
Learn how to use Python's built-in modules and install external packages to extend what your programs can do.
Object-Oriented Programming Basics
Learn the fundamentals of object-oriented programming: classes, objects, attributes, and methods.
Project: Command-Line Calculator
Put your skills together to build a fully working command-line calculator with a menu, multiple operations, and history.
What to Learn Next
You finished the basics. Now find out what to study next based on what you want to build with Python.