Operators and Expressions Interview Questions

    Question 1Python Arithmetic Operator

    What will be the output of the following code?

    x = 7 // 2 print(x)

    Question 2Python Exponentiation Operator

    Which of the following is the correct operator for exponentiation (power) in Python?

    Question 3Python Modulus Operator

    What is the result of -7 % 3 in Python?

    Question 4Python Comparison Operator

    What is the output of this code?

    print(5 == 5.0)

    Question 5Python Logical Operators

    What will be the result of the expression?

    x = True y = False print(x and not y)

    Question 6Python Identity Operators

    What is the output of this code?

    x = [1, 2, 3] y = [1, 2, 3] print(x is y)

    Question 7Python Membership Operators

    What will be the output?

    x = "Python" print("th" in x)

    Question 8Python Bitwise Operator

    What is the result of 6 & 3?

    Question 9Python Operator Precedence

    What will be the output of this code?

    x = 2 + 3 * 4 print(x)

    Question 10Python Augmented Assignment

    What is the output of the code?

    x = 5 x += 3 print(x)