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

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

Which TWO of the following are valid Python variable names?

⚠ Common exam trap

Python Institute often tests the rule that hyphens and spaces are invalid in variable names, as candidates may confuse Python with other languages (like Lisp or CSS) where hyphens are allowed, or mistakenly think spaces can be used for readability.

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

_count

(_count) is correct because Python allows variable names to start with an underscore, and it contains only letters, underscores, and digits. Underscore-prefixed names are commonly used for internal or private variables, but they are syntactically valid.

Answer analysis

Option-by-option breakdown

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

  • _count

    Why this is correct

    Underscore allowed at start.

  • my_var

    Why this is correct

    Valid characters: letters, underscores.

  • var-name

    Why it's wrong here

    Hyphen not allowed.

  • 2nd_var

    Why it's wrong here

    Cannot start with a digit.

  • var name

    Why it's wrong here

    Space not allowed.

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.