Courseiva
Data Types, Variables, Basic I/O and OperatorsmediumMultiple ChoiceObjective-mapped

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

Evaluate the expression: not (True or False) and (False or True). What is the result?

⚠ Common exam trap

The trap here is that candidates often forget the precedence of `not` over `and` and `or`, or misapply short-circuit evaluation, leading them to incorrectly compute the result as `True`.

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

False

The expression is evaluated step by step: first, `True or False` evaluates to `True`; then `False or True` evaluates to `True`; the `not` operator negates the first `True` to `False`; finally, `False and True` evaluates to `False`. Therefore, the correct answer is C.

Answer analysis

Option-by-option breakdown

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

  • SyntaxError

    Why it's wrong here

    The syntax is valid.

  • True

    Why it's wrong here

    The overall result is False.

  • False

    Why this is correct

    Step by step: not (True) and (True) = False.

  • None

    Why it's wrong here

    The expression returns a boolean.

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.