Informatics Practices

If the value of a = 10 and b = 15, then a *= b will assign …………… to the variable a.

  1. 25
  2. 150
  3. 100
  4. 225

Python Funda

1 Like

Answer

150

Reason — The operator *= is a shorthand for multiplying and assigning a value. So, a *= b means a = a * b. Given a = 10 and b = 15, the expression evaluates to a = 10 * 15, which results in a = 150.

Answered By

3 Likes


Related Questions