in Python

Today, we are going to talk about basic arithmetic operations in Python . BODMAS rule stands for Bracket Of Division, Multiplication, Addition and Subtraction . It explains the order of operations to solve an expression.

Similar to BODMAS rule , Python follows PEDMAS rule . It stands for Parentheses, Exponents, Division, Multiplication, Addition and Subtraction . PEDMAS is a synonym of BODMAS .

If an expression contains brackets like (), {}, [] , first we have to solve the bracket . Second division, multiplication, addition and subtraction from left to right. If solved in a wrong order will result in wrong result .

Simple Demonstration :

Above example will result 65.0 . Now, Let’s look at the math :

This is just a simple demonstration of PEDMAS/BODMAS in Python . Hope this was helpful to you 🙂 Happy Coding 🙂