Python Basics – Study Notes
Educational notes prepared for personal study.
Variables and Data Types
Python variables can store values such as integers, floating-point numbers, strings, and
Boolean values. Python determines the type automatically when a value is assigned.
Conditional Statements
if, elif, and else are used to execute different code depending on conditions. Conditions
commonly use comparison operators such as ==, !=, <, >, <=, and >=.
Loops
for loops iterate over sequences or ranges, while while loops continue as long as a condition
remains true.
Functions
Functions are reusable blocks of code defined with the def keyword. They can accept
parameters and return values using return.