V

Vijay Sangwan • 28.62K Points
Instructor II

Q. What is the output of the following Python code: print(2 * 3 + 5)?

  • (A) 11
  • (B) 16
  • (C) 5
  • (D) 10
  • Correct Answer - Option(A)
  • Views: 24
  • Filed under category Python

Explanation by: Vijay Sangwan
In Python, the multiplication operator (*) has higher precedence than addition (+), so 2 * 3 = 6, and then 6 + 5 = 11.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics