Main Menu

search

You are here

Python: Operators

[last updated: 2024-09-21]
Python home page
Python: Programming Statements
-----

  • Arithmetic operators:
    • The standards:     +     -     *     /
    • Exponents:     **
    • Modulo:     %
      returns the integer remainder after dividing first number by the second.
        eg. 7 % 2 = 1
        11 % 6 = 5
    • Floor Division:     //
      returns the integer that is less than or equal to the division.
        eg.   5 // 2 = 2
        9 // 4 = 2
        -7 // 2 = -4
  • Logical operators:
    These all return boolean results: either True or False
    • and()
    • or()
    • not()

.

.

.

eof