0% found this document useful (0 votes)
38 views1 page

Python Operators and Game Logic

Operators in programming are symbols that perform actions on operands, categorized into arithmetic, conditional, bitwise, and assignment types. Examples include addition (+), greater than (>), and assignment (=). Understanding these operators is essential for constructing statements in Python.

Uploaded by

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

Python Operators and Game Logic

Operators in programming are symbols that perform actions on operands, categorized into arithmetic, conditional, bitwise, and assignment types. Examples include addition (+), greater than (>), and assignment (=). Understanding these operators is essential for constructing statements in Python.

Uploaded by

Vartika Tiwari
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python

Operators are used to construct statements in programming


languages. They are symbols that represent an action to be
carried out on given operands.

Example: Example:
sum = 4**2 if (4 < 5) & (3 != 2):

Arithmetic Conditional

+ Addition > Greater than


- Subtraction >= Greater than or equal to
* Multiplication < Less than
/ Division <= Less than or equal to
% Modulus (remainder) == Equal to
** Exponent (to the power of) != Not equal to

Bitwise Assignment
& And = Gets the value of
| Or

You might also like