python day -5 quick start operators and its uses

Channel:
Subscribers:
1,470
Published on ● Video Link: https://www.youtube.com/watch?v=uUr7MElQ1K0



Duration: 31:55
24 views
3


1 Arithmetic Operators
Arithmetic operator is uses for numeric calculation between variables
+ ADD
- SUB
/ DIV
* MULTIPLY
** EXPONSIAL
// FLOOR DIVISION


a = 10
b = 20

print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a ** b)
print(a // b)

2 Assignment Operators
it is used for assign valve to the variable

# assign opt
#its is used for assign value of variable
a = 10
a **= 5
print(a)

Comparison Operators
comparation Operation is uses to compare between variable

#its is used for compare between variable
a = 10
b = 15
print(a = b)


Logical Operators
logical operators are used for performing logical operation
it is used to combine condistional statement

Logical AND: True if both the operands are true x and y
x = 5

print(x ==2 and x == 6)

Logical OR: True if either of the operands is true x or y

x = 5

print(x == 2 or x == 6)

Logical NOT: it gives reverse or True if the operand is false not x
print(not(x == 2 or x == 6))
x = 5


Identity Operators and Membership Operators
it is used for check two value in memory
x = ["apple", "banana"]
y = ["apple", "banana"]
z = x

print(x is z)