Post

Python Programming
Python Programming@PythonPr·
Python Question / Quiz; What is the output of the following Python code, and why? Comment your answers below!
Python Programming tweet media
English
31
11
93
11.2K
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@PythonPr Answer: B) 125 Explanation: a is a string "123". int(a) converts the string to an integer → 123. Then b + 2 becomes 123 + 2, which equals 125.
English
0
0
12
892
Ishika
Ishika@Ishika__k·
@PythonPr Option B Because.. Initially 'a' contains the string 123 then that string is converted to integer.... Later on 2 is added to the integer so 123+2 = 125
English
0
0
1
564
SanjayHM
SanjayHM@SanjayHM2025·
@PythonPr Answer is b "123 " is a string then it is converted to integer and added with two hence 123 + 2 = 125
English
0
0
0
10
Youngs
Youngs@khid_young·
@PythonPr B is the answer. a is a string. Then b = int (a) converted it into an int making b = 123, so b + 2 will be 125.
English
0
0
0
183
Fórmula (β)
Fórmula (β)@sayanfitness·
@PythonPr La variable b asume el integer 2y la variable 12 en a ,es = 125
Español
0
0
0
51
Wilson Wizard
Wilson Wizard@ASolovichh·
@PythonPr lowkey fair take that's so real, i'm deadass trying to figure it out rn
English
0
0
1
110
Paylaş