Rams Poster
1. Comments (# ...) explain each assignment – they are ignored by Python.
2. age = 29 creates an int object 29 and binds the name age to it. The same happens for the other three variables, each with its own type.
3. type(variable) returns the class of the object, letting us confirm the stored type.
4. Arithmetic: age + 1 adds two integers → a new integer. height / 2 mixes float and int; Python converts the int to float before division, so the result is a float.
5. String concatenation: greeting + " 👋" joins two strings, producing a new str.
6. Boolean logic: (age >= 18) evaluates to True (a bool). and is_student combines it with another bool, yielding the final bool stored in can_vote.
7. The final print statements show both the values and their types, confirming how Python dynamically handles each operation.
By experimenting with this script—changing values, swapping types, adding more operations—you’ll see why Python’s dynamic typing feels flexible yet predictable: the objects carry their type, and the language’s operators know how to act on each type.
4 ·