Operators in Python | EP-32 Arithmetic Operators in Python | Python Tutorials for Beginners | Python

Subscribers:
27,900
Published on ● Video Link: https://www.youtube.com/watch?v=MVTum8Ch13Y



Duration: 0:00
72 views
5


Python Opertaor

Operators are used to perform operations on variables and values.
Python divides the operators in the following groups:
1.Arithmetic operators
2.Comparison Operators
3.Logical Operators
4.Bitwise Operators
5.Assignment Operators
6.Membership & Identity Operators | Python “in”, and “is” operator

1. Python Arithmetic Operators

"""The Python operators are fundamental for performing mathematical calculations in programming languages like Python. Arithmetic operators are symbols used to perform mathematical operations on numerical values. In most programming languages, arithmetic operators include addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).

- Addition Operator
In Python, + is the addition operator. It is used to add 2 values.
val1=10
val2=20
add=val1+val2
print(add)

- Subtraction Operator
In Python, – is the subtraction operator. It is used to subtract the second
value from the first value.

val3=56
val4=20
sub = val3-val4
print(sub)

- Multiplication Operator
Python * operator is the multiplication operator. It is used to find the product of 2 values.

val5=56
val6=63
mul = val5*val6
print(mul)

- Division Operator
Python / operator is the division operator. It is used to find the quotient when the first operand is divided by the second.
val7=80
val8=10
div =val7/val8
print(div)

- Floor Division Operator
The // in Python is used to conduct the floor division. It is used to find the floor of the quotient when the first operand is divided by the second."""
floor_div = val7//val8
print(floor_div)

- Modulus Operator
The % in Python is the modulus operator. It is used to find the remainder when the first operand is divided by the second.

val9=20
val10=3
mod = val9%val10
print(mod)

- Exponentiation Operator
In Python, ** is the exponentiation operator. It is used to raise the first
operand to the power of the second.

val11 =6
val12=2
exp =val11**val12 # 6**2
print(exp)

What is the rule for arithmetic operators in Python?

Arithmetic operators in Python follow the standard mathematical order of operations, also known as BODMAS/BIDMAS rules:

Brackets
Orders (exponentiation, **)
Division and Multiplication (/, *, //, %)
Addition and Subtraction (+, -)

arth = 3+((2*(2**2))/2)-1
print(arth)
#3+((2*4)/2)-1
#3+8/2-1
#3+4-1
#7-1 =6

#PythonTutorials #PythonForBeginners #ArithmeticOperators #LearnPython #CodingForBeginners #Programming #PythonCoding #TechEducation #PythonProgramming #PythonCourse #Python #PythonTutorial #CodingTutorial #PythonTips #Programming #Coding

Connect With Us:
—————————————
➡️ Website: https://www.cybrosys.com/
➡️ Email: info@cybrosys.com
➡️ Twitter:   / cybrosys  
➡️ LinkedIn:   / cybrosys  
➡️ Facebook:   / cybrosystechnologies  
➡️ Instagram:   / cybrosystech  
➡️ Pinterest:   / cybrosys  




Other Videos By Cybrosys Technologies


2024-09-03How to Manage Group Payment in Odoo 18 Accounting | Group Payment in Odoo 18 Accounting | Odoo 18
2024-09-03Drive-Thru AI | Cybrosys Revolutionize Your Drive-Thru with AI-Powered Odoo| The Future of Fast Food
2024-09-02What are Python Logical Operators| EP-34 Logical Operators in Python| AND, OR, NOT |Python Operators
2024-09-02What are the Different Views in Horilla HRMS Recruitment Pipeline | View Management of Candidates
2024-09-02How to Create New Commission Plan in Odoo 18 Sales App | Odoo 18 Sales Commission | Odoo 18 Features
2024-08-30How to Create Lead Generation Rule in Odoo 17 Event App | Lead Generation Rule in Odoo 17 | Odoo 17
2024-08-30How to Merge Multiple Vendor Bills in Odoo 18 Purchase App | Merge Multiple Vendor Bills in Odoo 18
2024-08-28How to Configure Bank Reconciliation in Odoo 17 Accounting App | Bank Reconciliation in Odoo 17
2024-08-28How to Register Payment Against Draft Invoice in Odoo 18| Odoo 18 New Features| Odoo 18 Release Date
2024-08-28How to use Python Comparison Operators | EP-33 Python Comparison Operators | Precedence in Python
2024-08-27Operators in Python | EP-32 Arithmetic Operators in Python | Python Tutorials for Beginners | Python
2024-08-26How to Configure Products in Odoo 17 Website App | Product Management in Odoo 17 Website App
2024-08-26Bill/PO Matching & Down Payments in Odoo 18 Purchase App | Odoo 18 Down Payments on Purchase Orders
2024-08-26How to Configure Authorized Signatory on Invoice in Odoo 18| Odoo 18 Authorized Signatory on Invoice
2024-08-25How to Create & Manage Combo Products in Odoo 18 | Combo Products in Odoo 18| Odoo 18 New Features
2024-08-25What is Batch Payment in Odoo 17 Accounting | How to Group Payments Into a Single Batch in Odoo 17
2024-08-25How to Check IF a Number is Harshad or Niven Number in Python |EP-31 Harshad/Niven Number in Python
2024-08-22How to Create & Automate Asset Model in Odoo 17 Accounting | Asset Model & Automation in Odoo 17
2024-08-22How to Configure Taxes in Company Currency in Odoo 18 Accounting | Odoo 18 New Features | Odoo 18
2024-08-22Inside Cybrosys | A Glimpse into Our World | Best IT Company in Calicut, Kochi | Best Odoo Company
2024-08-21How to Make Sure One2Many Records Are Deleted When the Parent Record Deleted in Odoo 17