Once you can store and use data, the next step is to make your code think. This section introduces how to do calculations and make decisions using the data in your program. These skills allow your code to become smarter — reacting to user input, solving problems, and choosing different paths based on conditions.
Operators
Python uses operators to perform tasks like adding numbers, checking if two values are equal, or seeing which number is bigger. You’ll learn the difference between arithmetic operators (like + and *) and comparison operators (like == and <). Operators let your code work with data and make useful comparisons.
Selection
With conditionals, your program can select decisions (selections). You’ll use if, elif, and else to tell Python what to do in different situations. For example, you might want to check if a number is positive or negative, or decide what message to show based on the user’s score. This lesson shows you how to build code that reacts logically to different inputs.