Post

Python Developer
Python Developer@Python_Dv·
Comment below the output! 😃👇
Python Developer tweet media
English
52
7
138
15.1K
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv Answer: A) 11 ✅ Explanation: y is "2" (string), int(y) converts it to 2. So the expression becomes: 5 * 2 + 1 = 11.
English
0
0
6
756
Earnest Codes
Earnest Codes@Earnesto037·
@Python_Dv Answer: A. 11 This tests understanding of variable types and type casting. Why!? The variable x is assigned the integer value 5. The variable y is assigned the string value "2". The expression int(y) converts the string "2" into an integer 2. The multiplication x * int(y)
English
1
0
4
501
Manil Grover
Manil Grover@manilgrover1712·
@Python_Dv A) 11 ✅Great quiz! The key here is explicit type conversion: int(y) turns the string "2" into an integer 2, so it's 5 * 2 + 1 = 11.Without the int(), it'd raise a TypeError since you can't multiply int by str directly. Common gotcha for beginners! 📷🐍
English
0
0
2
260
moonlight
moonlight@thewizardofOzii·
@Python_Dv Print( 5*int(2)+1) 2 turned integer and finally: 5*2+1= 11.. first sequence of action is * and than + last process in coding.
English
0
0
2
73
Nyxio
Nyxio@TheNyxio·
@Python_Dv Even an 11 year old can answer it. Be Man give something challenging😏
English
0
0
1
39
Himanwell
Himanwell@HimanwellXXX·
@Python_Dv int(y) converts "2" to 2 5 * 2 = 10 10 + 1 = 11
English
0
0
1
40
Tripti Choudhary.
Tripti Choudhary.@Tripti0101·
@Python_Dv A. 11 x variable is assigned 5 and y variable is assigned a string 2 . which is then type casted to int and perform the operation .
English
0
0
1
203
Premakumar Thevathasan (Prem Iyer)
Premakumar Thevathasan (Prem Iyer)@KumarT00623760·
@Python_Dv x is assigned the integer value 5 y is assigned the string value "2" int(y) converts the string "2" into the integer 2 x * int(y) performs the multiplication: 5 * 2, resulting in 10 ... + 1 adds 1 to the result: 10 + 1, resulting in 11 print(...) displays the final value, 11.
English
0
0
1
55
Atharv Ghorpade
Atharv Ghorpade@atharv_gho66071·
@Python_Dv A=11 Since int("2") converts the string into int type and 5*2+1=11.
English
0
0
0
57
Swasti Naik
Swasti Naik@naik_swasti·
@Python_Dv 11 Because x is an integer and y is string but converted to integer and performed bodmas in print statement + 1 which equates to 11
English
0
0
0
91
Paylaş