Python Programming - Tricky Questions - Discussion
Discussion Forum : Tricky Questions - General Questions (Q.No. 20)
20.
What will be the output of the following Python code?
x = 0.1
y = 0.2
result = x + y
print(result)
Answer: Option
Explanation:
Floating-point arithmetic may result in small precision errors, and the actual result is approximately 0.30000000000000004.
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