+ 1
What python use the BODMAS rule for calculation
5 Respuestas
+ 1
yes
+ 2
Python follows the traditional mathematical rules of precedence, which state that multiplication and division are done before addition and subtraction. (You may remember BODMAS.) This means in our example above, 2 and 4 are multiplied first, and then the result is subtracted from 10.
+ 2
That means yes python use BODMAS
print (1+7-3*5/8)//so in this case according to BODMAS
Operations are follows
Operation 1:Divide
Operation 2: multiplication
Operation 3: Addition
Operation 4: Substraction
0
Thanks
0
Python follows mathematical convention. The acronym PEMDAS
i.e
parenthesis
exponent
multiply
divide
addition
subtraction