Python Operators u0026 Expressions Fundamentals Quiz Quiz

  1. Arithmetic Operator Basics

    Which operator is used in Python to calculate the remainder when dividing 17 by 5?

    1. /
    2. mod
    3. %
    4. //
    5. rem
  2. Integer Division Recognition

    What will the expression 9 // 4 return in Python?

    1. 2.5
    2. 2.25
    3. 2
    4. 2.0
    5. 2,25
  3. Comparison Operator Syntax

    Which operator is used to check if two values are not equal in Python?

    1. !=
    2. !==
    3. not=
    4. u003Cu003E
    5. ==
  4. Exponentiation Operation

    In Python, how do you raise 2 to the power of 5?

    1. 2*5
    2. 2**5
    3. 2**:5
    4. 2^5
    5. 2^^5
  5. Logical Operator Evaluation

    If a is True and b is False, what is the result of a and b?

    1. False
    2. a
    3. True
    4. None
    5. b
  6. Logical OR Identification

    Which Python operator represents logical OR between two variables?

    1. ||
    2. OR
    3. or
    4. u0026
    5. and
  7. Membership Operator Usage

    Given my_list = [1, 2, 3], which expression checks if 2 is an item in my_list?

    1. 2 with my_list
    2. 2 in my_list
    3. 2 includes my_list
    4. my_list has 2
    5. 2 inside my_list
  8. Identity Operator Function

    What does the 'is' operator check for in Python expressions?

    1. Whether the variable exists
    2. Whether two variables have the same type
    3. Whether a variable is a number
    4. Whether two variables reference the same object
    5. Whether two variables have the same value
  9. Assigning Values

    Which assignment operator increments a variable x by 3 in Python?

    1. x=3+
    2. x+=3
    3. x=+3
    4. x++3
    5. x:=3
  10. Expression Result

    What is the result of the expression (7 u003E 4) and (3 u003C 2) in Python?

    1. 7
    2. 3
    3. True
    4. False
    5. None
  11. Bitwise AND Operator

    Which symbol is used for the bitwise AND operation in Python?

    1. u0026u0026
    2. and
    3. |
    4. AND
    5. u0026
  12. Operator Precedence

    In the expression 4 + 5 * 2, which operation is performed first in Python?

    1. Multiplication
    2. Exponentiation
    3. Addition
    4. Subtraction
    5. Division
  13. Not Operator Understanding

    What is the result of not False in Python?

    1. 0
    2. False
    3. None
    4. True
    5. not
  14. Membership Operator Negative

    Given s = 'hello', which expression correctly checks that 'x' is not in s?

    1. 'x' outof s
    2. 'x' !in s
    3. not 'x' in s
    4. 'x' isnot s
    5. 'x' not in s
  15. Identity Operator Negative

    If a = [1,2] and b = [1,2], what is the result of a is not b in Python?

    1. TypeError
    2. False
    3. SyntaxError
    4. None
    5. True