Python Programming - Data Types - Discussion
Discussion Forum : Data Types - General Questions (Q.No. 36)
36.
What will be the output of the following code snippet?
x = 10
y = "5"
result = x + int(y)
print(result)
Answer: Option
Explanation:
The
int(y)
converts the string '5' to an integer, and then the addition results in 10 + 5 = 15.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers