QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 113

What is the value of -3 // 2?

  1. -2Ճիշտ պատասխան
  2. -1
  3. 1
  4. -1.5

Բացատրություն

Floor division chooses the greatest integer no larger than the exact quotient, so -1.5 floors to -2. Truncation toward zero would give -1, but that is not the rule used by this operator.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 113: What is the value of -3 // 2? · Python Fundamentals · Questena