# Operators and Operands in Python

Operators refer to special symbols that perform operations on values and variables. Furthermore, the operands in python, one of the programming languages, refer to the values on which the operator operates. Most noteworthy, operators can carry out arithmetic, relational, and logical operations.

Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â Â Operands in Python

### Arithmetic Operators in Python

The use of arithmetic operators and operands in python takes place to perform mathematical operations like addition, subtraction, multiplication and division.

There are 7 arithmetic operators in Python:

• Subtraction
• Multiplication
• Division
• Modulus
• Exponentiation
• Floor division

Addition Operator:Â In Python, the additional operator isÂ +. Furthermore, its use takes place to add 2 values.

Example:

                    
val1 = 2

val2 = 3

res = val1/val2

print(res)



Output

                    
5



Subtraction Operator:Â In Python,Â the subtraction operator is â€“. Furthermore, its use takes place to subtract the second value from the first value.

Example :

                    
val1 = 2

Â val2 = 3

# using the subtraction operator

res = val1 - val2

# using the subtraction operator

res = val1 - val2

print(res)



Output :

                    
-1



Multiplication Operator:Â In Python,Â the multiplication operator is *. Furthermore, its use takes place to find the product of 2 values.
Example:

                    
Val1 = 2

Val2 = 3

# using the multiplication operator

res = val1 * val2

print(res)



Output :

                    
6



### Browse more Topics UnderÂ Variables, Expressions and Statements

Division Operator:Â In Python,Â /Â represents the division operator. Furthermore, its use takes place to find the quotient when the division of the first operand takes place by the second.
Example:

                    
val1 = 3

val2 = 2

# using the division operator

res = val1 / val2

print(res)



Output :

                    
1.5



Modulus Operator:Â In Python,Â %Â is the modulus operator. Furthermore, its use takes place to find the remainder when the division of the first operand happens by the second.
Example :

                    
val1 = 3

val2 = 2

# using the modulus operator

res = val1 % val2

print(res)



Output :

                    
1



Â Exponentiation Operator:Â In Python,Â **Â is the exponentiation operator. Furthermore, i to raise the first operand to power of second.
Example :

                    
val1 = 2

val2 = 3

# using the exponentiation operator

res = val1 ** val2

print(res)



Output :

8

Floor division:Â In Python,Â conducting of floor division takes place by //. Furthermore, its use takes place to find the floor of the quotient when the division of the first operand takes place by the second.
Example :

                    
val1 = 3

val2 = 2

# using the floor division

res = val1 // val2

print(res)



Output :

                    
1



### Relational Operators in Python

The use of relational operators and operands in pythonÂ takes place for comparing the values. Furthermore, it either returns True or False in accordance with the condition. One may also call these relational operators in python as comparison operators.

Operator – >

Description – Greater than: True if the left operand is greater than the right

Syntax – x > y

Operator – <

Description – Less than: True if the left operand is less than the right

Syntax – x < y

Operator – ==

Description – Equal to: True if both operands are equal

Syntax – x == y

Operator – !=

Description – Not equal to â€“ True if operands are not equal

Syntax – x != y

Operator – >=

Description – Greater than or equal to: True if the left operand is greater than or equal to the right

Syntax – x >= y

Operator – <=

Description – Less than or equal to: True if the left operand is less than or equal to the right

Syntax – x <= y

### Logical Operators in Pythons

In Python, the use of logical operators and operands in python takes place on conditional statements (either True or False). Furthermore, with logical operands in python, the performance ofÂ Logical AND,Â Logical ORÂ andÂ Logical NOTÂ operations takes place. Let us understand logical operators in python with clarity.

Operator – and

Description – Logical AND: True if both the operands are true

Syntax – x and y

Operator – or

Description – Logical OR: True if either of the operands is true

Syntax – x or y

Operator – not

Description – Logical NOT: True if the operand is false

Syntax – not x

## FAQs For Operators and Operands in Python

Question 1: Differentiate between operators and operands in python?

Answer 1: Operators are special symbols thatÂ facilitate the manipulation of the variables and constantsÂ in theÂ expressions.Â In contrast, operands in pythonÂ are the variables or constants on which theÂ operatorsÂ work.

Question 2: Explain operands in python with example?

Answer 2: Example of operands in python can be “1 + 2” the “1” and “2”. Here, the operator is the plus symbol.

Share with friends

## Customize your course in 30 seconds

##### Which class are you in?
5th
6th
7th
8th
9th
10th
11th
12th
Get ready for all-new Live Classes!
Now learn Live with India's best teachers. Join courses with the best schedule and enjoy fun and interactive classes.
Ashhar Firdausi
IIT Roorkee
Biology
Dr. Nazma Shaik
VTU
Chemistry
Gaurav Tiwari
APJAKTU
Physics
Get Started

## Browse

### One response to “Values, Variables and Keywords”

1. Brij Bhushan says:

Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I also love your website because all type of information is available in your blogs. You made my day. Thanks you for everything. I have bookmarked more article from this website. Such a nice blog you are providing.