KnowledgeBoat Logo

Computer Science

What is the value of x?
    x = int(13.25 + 4/2)

  1. 17
  2. 14
  3. 15
  4. 23

Python Funda

2 Likes

Answer

15

Reason — According to operator precedence, division will be done first followed by addition and then it will convert to integer.

x = int(13.25 + 4/2)
x = int(13.25 + 2.0)
x = int(15.45)
x = 15

Answered By

3 Likes


Related Questions