Hello World 2
Test markdown copy pasta.
Variables
Variables are used to store data values. They are created when you assign a value to them.
Assignment
- Use the equals (=) sign to assign values
age = 25
name = "Alice"
is_student = True
- Variables can change type after assignment
x = 10 # x is an integer
x = "ten" # now x is a string
Naming Rules
- Must start with a letter (a-z, A-Z) or an underscore (_).
- Can contain letters, digits (0-9), or underscores after the first character.
- Case-sensitive: myVar and myvar are different variables.
- Cannot be a reserved keyword (e.g., if, else, while).
# Valid variable names
my_var = 1
_var2 = 2
name3 = "Bob"
# Invalid variable names
2name = "Charlie" # Starts with a digit
my-var = 5 # Contains a hyphen
if = 10 # 'if' is a reserved keyword