The result of the following addition:

The result of the following addition:

123 + 0.0
A . cannot be evaluated
B. is equal to 123.0
C. is equal to 123

Answer: B

Explanation:

Topics: addition operator integer float

Try it yourself:

print(123 + 0.0) # 123.0

If you have an arithmetic operation with a float,

the result will also be a float.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments