Question 196 of 498
PCEP Computer Programming and Python Fundamentals Practice Question
Exhibit
Refer to the exhibit.
x = 10
if x > 5:
print('Greater')
else:
print('Less or equal')What is the output of the code in the exhibit?
⚠ Common exam trap
A common pitfall: candidates may incorrectly assume the if block executes or forget that else runs when the condition is false, leading them to choose 'Greater' instead of correctly identifying the else output.
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
✓
Less or equal
The code assigns x=10 and y=20 (assuming the exhibit shows these values), then checks if x > y. Since 10 > 20 is False, the if block does not execute, and the else block prints 'Less or equal'. Therefore, option C is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Greater\nLess or equal
Why it's wrong here
The code produces a single line of output, not two lines.
- ✗
SyntaxError
Why it's wrong here
The syntax is valid and no SyntaxError occurs.
- ✓
Less or equal
Why this is correct
The condition is false, so the else block executes and prints 'Less or equal'.
- ✗
Greater
Why it's wrong here
The condition is false, so 'Greater' is not printed.
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 →
Last reviewed: Jul 4, 2026
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.
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.
Sign in to join the discussion.