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

Classify the boundaries of the basic slice text[2:5]. Which statements are true? Select all that apply.

  1. The element at index 2 is included.Ճիշտ պատասխան
  2. The element at index 2 is excluded.
  3. The element at index 5 is excluded.Ճիշտ պատասխան
  4. The element at index 5 is included.

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

The element at position 2 is eligible because the start boundary is inclusive, while the element at position 5 is excluded by the stop boundary. Claims that include both ends or reverse their roles misread the half-open interval.

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

Սկսել վարժանքը
Հարց 100: Classify the boundaries of the basic slice text[2:5]. Which… · Python Fundamentals · Questena