PCEP Practice Question: Data Types, Variables, Basic I/O and Operators
Which THREE of the following are valid Python variable names?
⚠ Common exam trap
Python Institute often tests the rule that hyphens are invalid in identifiers, tempting candidates who are used to hyphenated names from other contexts, and also tests that leading digits are forbidden, catching those who think numbers can appear anywhere.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
myVar2
Python variable names must start with a letter or underscore, and can contain letters, digits, and underscores. 'myVar2' begins with a letter and uses only valid characters, making it a legal identifier.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
myVar2
Why this is correct
Letters and digits allowed.
- ✗
my-var
Why it's wrong here
Hyphen not allowed in identifiers.
- ✓
_myVar
Why this is correct
Underscore allowed as first character.
- ✓
value
Why this is correct
All lowercase letters valid.
- ✗
2ndValue
Why it's wrong here
Cannot start with a digit.
Go deeper
Related to this question
About these practice questions
This PCEP question is part of Courseiva's 498-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCEP practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCEP exam.