Single Choice Not Set

QWhat will be the output after the following statements?
x = 25
y = 15
x -= y
print(x)

ID: #3408 Python Operator MCQ 345 views
Question Info
#3408Q ID
Not SetDifficulty
Python Operator MCQTopic

Choose the Best Option

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

  • A 10
  • B 25
  • C 15
  • D -15
Correct Answer

Explanation

  • It subtracts right operand from the left operand and assign the result to left operand
  • x -= y is equivalent to x = x – y

x = 25 – 15

x = 10

Share This Question

Challenge a friend or share with your study group.