Python Operators
Python Operators
Python Operators
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
Identity Operators
Membership Operators
Bitwise Operators
Arithmetic Operators
+ qo’shish << x + y
- ayirish << x – y
* ko’paytrish << x * y
/ bo’lish << x / y
% qoldiqni aniqlash << x % y
** darajaga ko’tarish << x ** y
// bo’linmani yaxlitlaydi << x // y
Assignment Operators
= x=2
+= x += 2 x = x +2
-= x -=2 x=x-2
*= x *= 2 x=x*2
/= x /= 2 x=x/2
%= x %= 2 x=x%2
**= x **= 2 x = x**2
Comparison Operators
== teng x==y
!= teng emas x!=y
> dan katta x>y
< dan kichik x<y
>= katta yoki teng x >= y
<= kichik yoki teng x <= y
Logical Operators
and True ga qaytadi agar 2 ta xolat to’g’ri bo’lsa x < 7 and x < 15
not Agar xolat to’gri bo’lsa not operatori uni xatoga aylantiradi
not(x < 7 and x < 15)
Identity Operators