Skip to content
Question 78 of 97

Q.Which of the following is not a valid variable name in Python? Justify reason for it not being a valid name.

(i) 5Radius
(ii) Radius_
(iii) _Radius
(iv) Radius
Punjab PsebCBSE Class XII Board 2020Subjective· 1mImportance★★★★★
80% · 78/97 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Python variable names must start with a letter or underscore, not a digit. 5Radius starts with a digit, so it is invalid. The valid names are Radius_, _Radius, and Radius.

The core rule here is simple: Python follows the same naming convention as most programming languages — a variable name must begin with either a letter (a–z, A–Z) or an underscore (_). It cannot start with a digit. After the first character, you can use letters, digits, or underscores freely.

Why this rule? It prevents ambiguity. If 5Radius were allowed, the interpreter wouldn't know whether 5 is part of a number or a variable name. For example, 5Radius + 3 could be read as 5 (a number) plus Radius (a variable) plus 3, or as a single variable 5Radius plus 3. To avoid this confusion, the language simply forbids names starting with a digit.

Let's check each option:

  1. 5Radius — Starts with the digit 5. This violates the rule. Python will raise a SyntaxError if you try to use it.

    Watch out

    A common mistake is thinking that digits anywhere in a name are fine — they are, but not at the start. Radius5 is perfectly valid; 5Radius is not.

  2. Radius_ — Starts with a letter (R), followed by letters and an underscore. Allowed. Perfectly valid. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.