Computer Science

Kritika wants to divide a number and store the result without decimal places into an integer variable. Suggest an appropriate operator from the following:

  1. /
  2. %
  3. //
  4. Both (a) and (b)

Python Funda

2 Likes

Answer

//

Reason — The // operator is the floor division operator, which divides the number and returns the result as an integer by discarding the decimal part.

Answered By

2 Likes


Related Questions