Post

@Python_Dv Answer: C) 1005
The Python code first initializes a variable a as a string "100". The next line, a += "0", concatenates the string "0" to the existing string, changing the value of a to "1000". Finally, the print() function converts the string a to an integer
English

@Python_Dv Option c
First a is string so adding zero is like adding string so 100 get converted to 1000
Now again 1000 convert in int now when we add 5 in given int it will give 1005
Thus option c is correct
English

@Python_Dv C. 1005
Because u have converted string into integer
English

@Python_Dv C 1005 a+="0" is strings concatenated together.After converting to an integer, adding 5 equals 1005.
English

@Python_Dv Alternative C: 1005
First the str concatenates "100" with "0", generating the str instance "1000"
Then, a int instance is created by this str with a value of 1000, and sum 5 to it at print call.
English

@Python_Dv Answer:-(C)1005
a is a string.
a += "0" equals to a = a + "0"
Now the value of a is a = "1000".
int(a) ---> convert a into integer after add 5 to a.
So the final value is 1005.
English































