PYTHON NOTES
1. DATA TYPES
- String: Text inside quotes ("Hello")
- Integer: Whole numbers (1, -2, 0)
- Float: Decimal numbers (2.5, -3.4)
- Boolean: True or False
2. CONDITIONAL STATEMENTS
- if: Executes when condition is true
- if-else: Executes alternate block if false
- elif: Multiple conditions
3. STRINGS
- Concatenation: "Hello" + "World"
- Repetition: "*" operator
- Indexing & Slicing
- Methods: upper(), lower(), split()
4. OPERATORS
- Arithmetic: +, -, *, /, %, **
- Relational: >, <, ==, !=
- Logical: and, or, not
5. INPUT & OUTPUT
- input(): Take user input
- print(): Display output
6. LOOPS
- while loop
- for loop
- range()
7. LISTS
- Store multiple values
- Indexing & slicing
- Methods: append(), remove(), sort()
8. FUNCTIONS
- Reusable code blocks
- Arguments & return values
9. ADVANCED
- Recursion
- Nested loops
- Break, Continue, Pass