Single Choice Not Set

QWhat will be the output after the following statements?
x = 2
y = 3
x **= y
print(x)

ID: #3649 Python Operator MCQ 404 views
Question Info
#3649Q ID
Not SetDifficulty
Python Operator MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 7
  • B 12
  • C 8
  • D 5
Correct Answer

Explanation

    • Performs exponential (power) calculation on operators and assign value to the left operand.
    • x *= y is equivalent to x = x ** y

    x = 2**3

    x = 8

Share This Question

Challenge a friend or share with your study group.