Computer Science, asked by alamaraavd, 4 months ago

Which of the following operator is the operator for integer division in Python?. Single choice.
(1 Point)
%
/
//
None of these

Answers

Answered by RvP10
1

Answer:

// operator is used for Integer division

Explanation:

7//2 = 3

7/2 =3.5

Answered by SamikshaDhere
0

Answer:

" / "

Explanation:

  • Python use " / " operator to calculate integer divisions.

E.g. In python if we need to perform a division between two numbers, then we use " / ".

E.g.

num1 = 12

num2 = 4

To get \frac{num1}{num2} ,

we type print(num1 / num2);

The answer for num1 / num2 is 3.

  • Python uses " % " to calculate module of two numbers. i.e. to get remainder of the performed division.

E.g.

If num1 = 20

num2 = 3

then print(num1 % num2) = 2

as 3 * 6 = 18

and 20 - 18 = 2

  • Python uses " // " to calculate floor division between two numbers. i.e. round value of performed division.

E.g.

If num1 = 5

num2 = 3

print(num1 // num2) = 1

#SPJ2

Similar questions