Python Basics and Operators
In Python, you can assign values to variables with a simple equals sign. For example, a = expression evaluates the expression and stores the result in variable a.
The print() function displays values on the screen, while input() collects information from users. These are the building blocks of any interactive Python program.
Python includes several arithmetic operators that follow standard math order of operations. Besides the familiar +, -, *, /, and ** (exponentiation), Python has two special division operators:
%(modulo): Returns the remainder after division (like17 % 5equals 2)//(integer division): Returns just the quotient without decimals (like17 // 5equals 3)
Pro tip: The modulo operator (
%) is extremely useful for determining if a number is even or odd. Ifnumber % 2 == 0, the number is even!






