Post

Sergei Kotov
Sergei Kotov@kotov_dev·
@Python_Dv Tricky one! The answer is 5. float('3.5') converts the string to 3.5, then int() truncates (doesn't round!) to 3, finally 3 + 2 = 5. Fun fact: int() always truncates toward zero - try int(-3.7) and you get -3, not -4!
English
2
1
23
641
MorgganDev
MorgganDev@MorgganDev·
@Python_Dv The answer is 5, although I find it strange that it's not among the available options.
English
0
0
0
133
Paylaş