- 11
What is the output of this code? >>> x = 5 >>> y = x + 3 >>> y = int(str(y) + "2") >>> print(y)
19 odpowiedzi
+ 11
You are concatenating two strings together, then coverting them to an integer. Therefore, your output will be 82.
+ 3
thanks everyone
+ 2
string concatenation is working here, '8' + '2' = '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)
+ 1
a = 5
b = 9
x = str(a)
y = str(b)
print(x+y)
0
82
0
What is the output of this code and explain how
X= 9.34
Y=int(X)
Print(Y)
0
What's the output of this code?
x = 5
y = x + 3
y = int(str(y) + "2")
print(y)
82
0
X = "10"
Y = 5
Z = x + str(y)
Print(z)
Answer please
- 1
thanks for your help i was stuck on this problem lmao :)))))) xD xoxo
- 1
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
- 1
82
- 1
82
- 1
82
- 1
this is so dumb like wtf is this
- 2
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 ?
- 2
x = 4
x
+
= 5
- 4
X=5
Y=x+3
Y=int(str(y)+"2")
print(y)