0% found this document useful (0 votes)
5 views9 pages

Essential Python Operators Explained

The document provides an overview of various Python operators, categorized into arithmetic, assignment, comparison, logical, identity, and membership operators. Each category includes examples of operators and their usage in Python code. This serves as a reference for understanding how to perform operations and comparisons in Python programming.

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)
5 views9 pages

Essential Python Operators Explained

The document provides an overview of various Python operators, categorized into arithmetic, assignment, comparison, logical, identity, and membership operators. Each category includes examples of operators and their usage in Python code. This serves as a reference for understanding how to perform operations and comparisons in Python programming.

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

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