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