Courseiva
Computer Programming and Python FundamentalseasyMultiple SelectObjective-mapped

PCEP Computer Programming and Python Fundamentals Practice Question

Which two of the following are valid Python variable names? (Choose two.)

⚠ Common exam trap

The PCEP exam often tests the rule that hyphens are illegal in variable names, as candidates may confuse them with underscores or assume they are allowed like in some other languages.

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

value_2

Python variable names can contain letters, digits, and underscores, and must start with a letter or underscore. 'value_2' starts with a letter and uses an underscore, making it 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.

  • value_2

    Why this is correct

    Valid identifier.

  • value-2

    Why it's wrong here

    Contains hyphen, invalid.

  • 2nd_value

    Why it's wrong here

    Starts with a digit, invalid.

  • _value

    Why this is correct

    Starts with underscore, valid.

  • for

    Why it's wrong here

    Reserved keyword, invalid.

About these practice questions

Courseiva writes every PCEP question from scratch — 498 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.