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, addition

a-b {displaystyle a-b,} a-b, subtraction

a*b {displaystyle atimes b,} atimes b, multiplication

a/b {displaystyle adiv b,} adiv b, division (see note below)

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

Parentheses ( … ) Please

Exponents ** Excuse

Multiplication

and Division * , / , // , % My Dear

Addition

and Subtraction + , – Aunt Sally

#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse

★★★Top Online Courses From ProgrammingKnowledge ★★★

Python Programming Course ➡️ ⚫️

Java Programming Course ➡️ ⚫️

Bash Shell Scripting Course ➡️ ⚫️

Linux Command Line Tutorials ➡️ ⚫️

C Programming Course ➡️ ⚫️

C++ Programming Course ➡️ ⚫️

PHP Programming Course ➡️ ⚫️

Android Development Course ➡️ ⚫️

C# Programming Course ➡️ ⚫️

JavaFx Programming Course ➡️ ⚫️

NodeJs Programming Course ➡️ ⚫️

Jenkins Course For Developers and DevOps ➡️ ⚫️

Scala Programming Tutorial Course ➡️ ⚫️

Bootstrap Responsive Web Design Tutorial ➡️ ⚫️

MongoDB Tutorial Course ➡️ ⚫️

QT C++ GUI Tutorial For Beginners ➡️

★★★ Online Courses to learn ★★★

Get 2 FREE Months of Unlimited Classes from skillshare –

Data Science – |

Machine Learning – |

Artificial Intelligence – |

MERN Stack E-Degree Program – |

DevOps E-degree – |

Data Analytics with R – |

AWS Certification Training – |

Projects in Java – |

Machine Learning With TensorFlow – |

Angular 8 – Complete Essential Guide –

Kotlin Android Development Masterclass –

Learn iOS Programming Building Advance Projects –

★★★ Follow ★★★

My Website –

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

source

Theodore ChoiJanuary 12, 2020 at 1:10 am😊😊😊

TechDiffuseJanuary 12, 2020 at 1:10 amThanks for this great tutorial. I have made a similar blog post about this topic. Hope its helpful for someone: https://techdiffuse.com/en/2019/08/12/python-simple-math/

saatwiik srivastavaJanuary 12, 2020 at 1:10 amIs PEMDAS the same thing as BODMAS ?

Nikita MathurJanuary 12, 2020 at 1:10 amHi,

You explained that if we don't want decimal value, we can do 50 // 3. But how to do that in an expression of multiple operands. For example: 5 + 9 – 6 * 10 / 20 was giving the result as 11.0

How to get this expression result in just 11 (not 11.0)?

Random ThingsJanuary 12, 2020 at 1:10 amWhat of doing factorial?

Hassan BraimJanuary 12, 2020 at 1:10 amHello dear,

so, i like your tuto very much, it's really useful for beginner ,

but i don't understand why the videos are in reverse way, so it can't be read automatically,

i have to search the next tuto and cilck on it. this is not useful

please, if you can fix it , do it.

thanks

Rameez AhmedJanuary 12, 2020 at 1:10 amDear Sir, your tutorial extremely help me in my assignments and projects

salman kevinJanuary 12, 2020 at 1:10 amSir give more details in tue video and example programs and assignments

Hridoy AhmedJanuary 12, 2020 at 1:10 amWow..Thanks for redoing this series..New thing is coming soon

Web HunterJanuary 12, 2020 at 1:10 amWhy u r redoing it? This series

Asbin RaiiJanuary 12, 2020 at 1:10 amNice

Sir this is python 3

OK

We want more python course

Rajneesh KumarJanuary 12, 2020 at 1:10 amSir C LANGUAGE ka video banaiye