0

print(3**2//4- -1) output is 3 please explain how

19th Apr 2017, 2:36 AM
Ushan Sameera
Ushan Sameera - avatar
3 ответов
+ 4
If you're asking about operator precedence, you can find the list here: https://docs.python.org/3/reference/expressions.html#operator-precedence
19th Apr 2017, 3:07 AM
Igor B
Igor B - avatar
+ 13
3**2 = 3 to the power of 2 = 9 So, 3**2//4 - -1 becomes 9//4 - -1 which is simply 9//4 +1 9//4 = quotient when 9 is divided by 4 = 2 as 9 = 4*(2)+1 So, result = 2 + 1 = 3.
19th Apr 2017, 2:59 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 3
wow thanks mr Krishna can u send me the all priority things I mean the list of python simply fication priority as an example first ** second // likewise I want all the priority list
19th Apr 2017, 3:01 AM
Ushan Sameera
Ushan Sameera - avatar