What is the output of this code? >>> x = 5 >>> y = x + 3 >>> y = int(str(y) + "2") >>> print(y) | Sololearn: Learn to code for FREE!

-9

# What is the output of this code? >>> x = 5 >>> y = x + 3 >>> y = int(str(y) + "2") >>> print(y)

6/19/2018 8:46:35 AM

Shruti Sharma

+8

You are concatenating two strings together, then coverting them to an integer. Therefore, your output will be 82.

+3

thanks everyone

+3

string concatenation is working here, '8' + '2' = '82'

+2

The answer is not 42 but 82.

+1

The answer is 82. Why? : //The value of x is 5 >>> x = 5 //now y is 5 +3 i.e 8 >>> y = x + 3 so this line is changing 8 to a string and concatenate that string 8 to string 2 , then convert the string "82" to an integer int(str(y) + "2") >>> print(y)

0

82

0

thanks for your help i was stuck on this problem lmao :)))))) xD xoxo

0

Pour cette question le bon code est : x = (5) y = (x + 3) y = int(str(y) + "2") print(y) Sinon ça ne fait pas 82 mais error

0

0

82

0

-1

What is the answer for the question after. File in the blank to declare a variable, add 5 to it and print it value x = 5 X —— = 4 Print —— I forgot this part any help ?

-1

x = 4 x + = 5

-1