Computer Science - Text-Based Programming - Python - Variables and data types - Predict the Output
8 questions predicting what Python code outputs. Q1: x = 10; x = x + 5; print(x) → 15 (variables can be updated). Q2: name = 'Python'; print(type(name)) → <class 'str'>. Q3: a = '5'; b = '3'; print(a + b) → '53' (string concatenation, not addition!). Q4: x = 10; y = 3; print(x / y) → 3.333... (divis