Post

Sergei Kotov
Sergei Kotov@kotov_dev·
@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
0
0
10
583
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv Answer: B) 125 "123" → int("123") becomes 123 Then 123 + 2 = 125 No trick here—just string → int conversion, then arithmetic.
English
0
0
8
1K
Earnest Codes
Earnest Codes@Earnesto037·
@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
1
0
6
915
Python Tech
Python Tech@PythonTech43716·
@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
0
0
2
667
EVY TECHNO
EVY TECHNO@EvyTechno·
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
0
0
1
17
Laxman 🧮🐧
Laxman 🧮🐧@CodeWithBinary·
@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
0
0
1
12
Mohamed Ibrahim
Mohamed Ibrahim@MahmmedIbr88346·
@Python_Dv B) 125 Because he converted the text to a number and added 2👏
English
0
0
1
330
Jenny
Jenny@JennyTheDev·
@Python_Dv B) 125 "123" → int → 123 + 2 = 125 String to int conversion. Classic beginner trap.
English
0
0
1
1.1K
Vivek
Vivek@silicon_no1·
@Python_Dv Answer is B) 125 b=int(a) coverts string into int (123) then b has already 123+2 means 125✅
English
0
0
0
2
pooja_jha
pooja_jha@poojajha29·
@Python_Dv Ans : B B = int (a) means a is integer Print (123 + 2) is print 125 So , output is 125
English
0
0
0
197
Paylaş