(12+5)/10*10 evaluates to 17.0 in Pycharm(Python 3.6.7) and same expression evaluates to 10 in CodingBat(Python 3.x). According to this question(BODMAS - python), Pycharm is right?
Asked
Active
Viewed 53 times
0
-
4One of them is not Python 3. – ayhan Jan 06 '19 at 01:19
-
Pycharm is running 3.6.7 and I am sure that coding bat is also running 3.x. – Dexter Jan 06 '19 at 01:20
-
2Took a look at CodingBat. Doesn't seem to list what version of Python it's using. It would seem to be Python 2.x from what you found. `/` is integer (floor) division in Python2, and float division in Python3. – C S Jan 06 '19 at 01:21
-
And how it will evaluate in python 2? – Dexter Jan 06 '19 at 01:21
-
Got it. Thank you!! – Dexter Jan 06 '19 at 01:25