Courseiva
Question 11 of 498
Data Types, Variables, Basic I/O and OperatorseasyMultiple ChoiceObjective-mapped

PCEP Practice Question: Data Types, Variables, Basic I/O and Operators

Which of the following is a valid Python variable name?

⚠ Common exam trap

Python Institute often tests the misconception that hyphens or spaces are acceptable in variable names because they appear in other programming languages or file naming conventions, but Python strictly prohibits them.

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

_var

(_var) is correct because in Python, variable names must start with a letter or an underscore, and can contain letters, digits, and underscores. The underscore is explicitly allowed as the first character, making _var a valid 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.

  • 2var

    Why it's wrong here

    Cannot start with a digit.

  • var name

    Why it's wrong here

    Space is not allowed.

  • var-name

    Why it's wrong here

    Hyphen is not allowed.

  • _var

    Why this is correct

    Underscore is allowed as first character.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.