Operators

PythonΒ 
ArithmeticΒ 
Operators
AdditionΒ 
(+)
SubstractionΒ 
(-)
MultiplicationΒ 
(*)
DivisionΒ 
(/)
FloorΒ 
DivisionΒ 
(//)
Β 
-Β 
ReturnsΒ 
theΒ 
quotientΒ 
ofΒ 
theΒ 
division
ModulusΒ 
(%)
Β 
-Β 
ReturnsΒ 
theΒ 
remainderΒ 
ofΒ 
theΒ 
division
ExponentiationΒ 
(**)
Β 
-Β 
PowerΒ 
raisedΒ 
to
a,b=10,3
print('Add:',a+b,'Subtract:',a-b,'Multiply:',a*b,'Divide:',a/b)
print('Floor Division:',a//b) #floor division
#division always prints float value
print("Modulus:",a%b) #modulus #remainder when 10 is divided by 3
print("Exponentition:",a**b) #10 to the power 2

BEMDAS Rule - Solving equations with multiple operators

WheneverΒ 
thereΒ 
isΒ 
anΒ 
expressionΒ 
inΒ 
python,Β 
pythonΒ 
solvesΒ 
itΒ 
inΒ 
theΒ 
followingΒ 
order.Β 
1.Β 
BracketsΒ 
(B)
2.Β 
ExponentsΒ 
(E)
3.Β 
MultiplicationΒ 
(M)
4.Β 
DivisionΒ 
(D)
5.Β 
AdditionΒ 
(A)
6.Β 
SubtractionΒ 
(S)
WheneverΒ 
multipleΒ 
exponentΒ 
operatorsΒ 
areΒ 
usedΒ 
inΒ 
anΒ 
expression,Β 
pythonΒ 
solvesΒ 
itΒ 
fromΒ 
rightΒ 
toΒ 
left
.
CheatSheet