Python Operators

6.What is the result of the expression 4 ** 2 in Python?
  • A. 6
  • B. 8
  • C. 16
  • D. 2

16

16

7.Which operator is used for floor division in Python?
  • A. /
  • B. %
  • C. //
  • D. **

//

//

8.Which of these is a logical operator in Python?
  • A. &
  • B. &&
  • C. and
  • D. ||

and

and

9.What does the not operator do in Python?
  • A. Converts a number to zero
  • B. Repeats a string
  • C. Reverses the truth value
  • D. Adds Boolean values

Reverses the truth value

Reverses the truth value

10.What is the output of this code?
x = 5 y = 2 print(x // y)
  • A. 2.5
  • B. 2
  • C. 3
  • D. 2.0

2

2