Post

@Python_Dv Answer: B (125)
Step by step:
› a = "123" (string)
› b = int(a) = 123 (converts to integer)
› b + 2 = 123 + 2 = 125
For beginners: int() converts strings to numbers!
Without it: "123" + 2 would give TypeError (can't add string + int).
English

@Python_Dv Answer: B) 125
"123" → int("123") becomes 123
Then 123 + 2 = 125
No trick here—just string → int conversion, then arithmetic.
English

@Python_Dv Answer: B 125
Why!?
Initially, the variable a is assigned the string value "123".
The second line converts the string "123" into an integer 123 and assigns it to variable b [1.1].
The final line prints the result of the addition b + 2, which is 123 + 2.
English

@Python_Dv B) 125 is the right ✅️
Here just simple concept we are using here convert string variable into the integer by using typecasting method, and add of two numbers
English

The correct answer is B: 125.
Here is the step-by-step breakdown of how the code executes:
1. The Variable a
a = "123"
The variable a is assigned the value "123". Because it is wrapped in quotation marks, Python treats this as a string (text), not a number.
2. The Conversion
b = int(a)
The int() function is used for type casting. It takes the string "123" and converts it into the actual integer 123. Now, the variable b holds a numeric value that can be used for math.
3. The Calculation and Output
print(b + 2)
Python performs the addition: 123 + 2 = 125. The print() function then displays the result.
English

@Python_Dv Answer: B) 125
1. a = "123" => "123" is text (string), not a number
2. b = int(a) => called explicit typecasting , takes the string "123" and turns it into the number 123
3. b + 2 => 125
English

@Python_Dv B) 125
Because he converted the text to a number and added 2👏
English

@Python_Dv B) 125
"123" → int → 123 + 2 = 125
String to int conversion. Classic beginner trap.
English

@Python_Dv 125, string casted as integer + 2 which is an integer = 125. 😁 beginner trap!
English

@Python_Dv Answer is B) 125
b=int(a) coverts string into int (123) then b has already 123+2 means 125✅
English

@Python_Dv Ans : B
B = int (a) means a is integer
Print (123 + 2) is print 125
So , output is 125
English


























