0
Csn anyone plz explain me this one line code and how is the answer 18, i know precedence rule but still couldn't get it?
2 Respostas
+ 3
(4+2)*5 => 6*5 => 30
2**3*4 => 8*4 => 32
16 - 30 + 32 => 18
0
print(16 - (4+2)*5+2**3*4)
exponentation is first
16 - (4+2)*5+8*4
multiplication next, but items in brackets are totalled
16 - (6)*5 + 32
16 - 30 + 32
plus & minus have equal precedence
-14 +32
18