What is arithmetic operators?
arithmetic operators are symbols used to perform mathematical calculation is programing.
operators Name
- Addition
- Subtraction
- Multiplication / Division // Floor Division % Modulus ** Exponent
Addition:
a=10
b=3
print(a+b)
output
13
Subtraction:
a=10
b=3
print(a-b)
output
7
Multiplication:
a=10
b=3
print(a*b)
output
30
Division:
a=10
b=3
print(a/b)
output
3.333...
Modulus(remainder):
a=10
b=3
print(a%b)
output
1
Floor Division:
a=10
b=3
print(a//b)
output
3
Exponent(power)
a=10
b=3
print(a**b)
`
output
1000
What is logical operators?
Logical operators are use combine condition and true of false.
Logical operators are symbols or keywords used to evaluate and combine boolean expressions, producing a result of either True or False. They are fundamental in decision-making, flow control, and conditional statements in programming, and also form the basis of Boolean logic used in computer circuits.
Common logical operators include:
1.AND (and / &&) – Returns True only if both conditions are true.
2.OR (or / ||) – Returns True if at least one condition is true.
3.NOT (not / !) – Negates the boolean value of an expression.
4.XOR (^) – Returns True if exactly one condition is true.
[TBD]
R E F E R E N C E:

Top comments (0)