In this Video I am going to show How to Use Basic Math, Mathematical Operators and Python Expressions In python.
So what is an expression ? An expression is A data value or set of operations to compute a value.
Arithmetic operators we will use:
+ – * / addition, subtraction/negation, multiplication, division
% modulus, a.k.a. remainder
** exponentiation
precedence: Order in which operations are computed.
Mathematical Operators
Here are some commonly used mathematical operators
Syntax Math Operation Name
a-b {displaystyle a-b,} a-b, subtraction
a*b {displaystyle atimes b,} atimes b, multiplication
a//b {displaystyle lfloor adiv b,rfloor } lfloor adiv b,rfloor floor division (e.g. 5//2=2) – Available in Python 2.2 and later
a%b {displaystyle a~{bmod {~}}b,} a~{bmod ~}b, modulo
-a {displaystyle -a,} -a, negation
abs(a) {displaystyle |a|,} |a|, absolute value
a**b {displaystyle a^{b},} a^{b}, exponent
Order of Operations (Python Operator Precedence)
Highest precedence at top, lowest at bottom.Operators in the same box evaluate left to right..
Name Syntax PEMDAS Mnemonic
Exponents ** Excuse
Multiplication
and Division * , / , // , % My Dear
and Subtraction + , – Aunt Sally
#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse
——————-Online Courses to learn—————————-
Blockchain Course – http://bit.ly/2Mmzcv0
Big Data Hadoop Course – http://bit.ly/2MV97PL
Java – https://bit.ly/2H6wqXk
C++ – https://bit.ly/2q8VWl1
AngularJS – https://bit.ly/2qebsLu
Python – https://bit.ly/2Eq0VSt
C- https://bit.ly/2HfZ6L8
Android – https://bit.ly/2qaRSAS
Linux – https://bit.ly/2IwOuqz
AWS Certified Solutions Architect – https://bit.ly/2JrGoAF
Modern React with Redux – https://bit.ly/2H6wDtA
MySQL – https://bit.ly/2qcF63Z
———————-Follow———————————————
My Website – http://www.codebind.com
My Blog – https://goo.gl/Nd2pFn
Pinterest – https://goo.gl/kCInUp
Text Case Converter – https://goo.gl/pVpcwL
————————-Stuff I use to make videos ——————-
Stuff I use to make videos
Windows notebook – http://amzn.to/2zcXPyF
Apple MacBook Pro – http://amzn.to/2BTJBZ7
Ubuntu notebook – https://amzn.to/2GE4giY
Desktop – http://amzn.to/2zct252
Microphone – http://amzn.to/2zcYbW1
notebook mouse – http://amzn.to/2BVs4Q3