0% found this document useful (0 votes)
19 views

Python Operators

Uploaded by

Shoxrux Chulliev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Python Operators

Uploaded by

Shoxrux Chulliev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

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

or True ga qaytadi agar 2 ta xolatdan bittasi to’g’ri bo’lsa


X < 7 or x < 15

not Agar xolat to’gri bo’lsa not operatori uni xatoga aylantiradi
not(x < 7 and x < 15)
Identity Operators

is agar ikkita o’zgaruvchan bir xil obyekt bo’lsa


True ga qaytadi x is y

is not ikkita o’zgaruvchan bir xil obyekt bo’lmasa


true ga qatytadi x is not y
Membership Operators

in True ga qaytadi agar biror bir qiymat obyektni


ichida bo’lsa x in y

not in bu esa in operatorining teskarisi x not in y

You might also like