In Python, True is treated as 1 in arithmetic operations. And going by PEDMAS/BODMAS, we know to evaluate the division before the addition, which gives us:
str(1 + 6.0) = 7.0
N.B. 7.0 and not 7 because all arithmetic operations with floats return floats.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
akumo
1 month agoOluwafemi_Akinlosotu
1 month ago