Courseiva
Computer Programming and Python FundamentalseasyMultiple ChoiceObjective-mapped

PCEP Computer Programming and Python Fundamentals Practice Question

Which of the following variable names is valid in Python?

⚠ Common exam trap

The PCEP exam often tests the rule that identifiers cannot start with a digit, leading candidates to mistakenly think that any non-alphabetic starting character is invalid, but underscores are explicitly allowed.

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

_private

(_private) is valid because Python allows variable names to start with an underscore. Identifiers can consist of letters, digits, and underscores, but must not begin with a digit. The underscore is treated as a letter, so _private conforms to Python's naming rules.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • 1st_value

    Why it's wrong here

    Variable names cannot start with a digit.

  • _private

    Why this is correct

    Underscores are allowed and often used for private attributes.

  • class

    Why it's wrong here

    'class' is a reserved Python keyword.

  • my-var

    Why it's wrong here

    Hyphens are not allowed; use underscores.

About these practice questions

One of 498 original PCEP practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.