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

A program runs `count = 3` and then `count = "three"`. Which description is accurate?

  1. The second statement raises TypeError because the type changed.
  2. The name ends up referring to a string object.Ճիշտ պատասխան
  3. The integer object is converted in place into text.
  4. The second statement is ignored because `count` already exists.

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

The later assignment rebinds `count` from an integer object to a string object. Nothing converts the integer into text, and Python does not require a later binding to preserve the earlier object's type.

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

Սկսել վարժանքը
Հարց 2: A program runs `count = 3` and then `count = "three"`.… · Python Fundamentals · Questena