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

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

Given 'a = 10; b = 3; c = a // b; d = a % b', what is the value of c + d?

⚠ Common exam trap

Python Institute often tests the distinction between floor division (//) and true division (/), and the trap here is that candidates may mistakenly use regular division (10 / 3 ≈ 3.33) and then add the remainder incorrectly, or forget that // and % are complementary operations that together reconstruct the original dividend.

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

4

In Python, the // operator performs floor division, so a // b = 10 // 3 = 3. The % operator returns the remainder, so a % b = 10 % 3 = 1. Therefore, c + d = 3 + 1 = 4, making option A 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.

  • 4

    Why this is correct

    Floor division gives 3, modulo gives 1, sum is 4.

  • 5

    Why it's wrong here

    Incorrect addition.

  • 7

    Why it's wrong here

    Incorrect addition.

  • 6

    Why it's wrong here

    Incorrect addition.

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.