Day 6 (Python Operators)။ Operands တွေကို operate လုပ်တဲ့ ကောင်ကို operator ခေါ်တာပေါ့။
WH Research Solutions
0:00 / 0:00
Day 6 (Python Operators)။ Operands တွေကို operate လုပ်တဲ့ ကောင်ကို operator ခေါ်တာပေါ့။
17 просмотров · 13 дн. назад
WH Research Solutions
115 подписчиков
17 просмотров · 13 дн. назад
Operands တွေကို operate လုပ်တဲ့ ကောင်ကို operator ခေါ်တာပေါ့။ သူ့ရဲ့အလုပ်အလိုက် ခွဲခြားတာဖြစ်ပါတယ်။ Operands အရေအတွက်နဲ့လဲ ခွဲနိုင်ပါတယ်။
1. Assignment Operators
• Assign values to the operand on the left side of the operator
• = , +=, -=, *=, /=, //=, %=, **=
2. Arithmetic Operators
• Addition: +
• Subtraction: -
• Multiplication: *
• Division: /
• Floor Division: // - returns the quotient of the division rounded down to the nearest integer
• Modulus: % - returns the remainder of the division operation
• Exponentiation: ** - raises the left operand to the power of the right operand.
3. Relational Operators
• Relational operators return: True or False (bool data type)
• Greater than:
• Less than:
• Greater than or equal:
• Less than or equal:
• Equal: ==
• Not equal: !=
4. Logical Operator
• Logical operators return True or False (bool data type)
• and – returns True only when both conditions are true simultaneously
• or – returns True if either of the conditions is true
• not – inverts the result, True changes to False and False changes to True
5. Membership Operator (in, not in)
• Checks whether a value or variable exists in a sequence data type or not
• Returns True or False