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

Classify the range rules for range(stop) and range(start, stop, step). Which statements are true? Select all that apply.

  1. An omitted start is zero.Ճիշտ պատասխան
  2. The stop value is excluded.Ճիշտ պատասխան
  3. An omitted step is one.Ճիշտ պատասխան
  4. The produced values are floats.
  5. The stop value is always included.

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

A range begins at zero when no start is supplied, uses a default step of one, and never includes its stop value. The claim that it produces floating-point values is false because ordinary range objects produce integers.

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

Սկսել վարժանքը
Հարց 62: Classify the range rules for range(stop) and range(start,… · Python Fundamentals · Questena