← All PCEP Flashcard Decks

PCEP Numeric Types and Arithmetic Flashcards

6 cards from real PCEP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 PCEP Numeric Types and Arithmetic flashcards as text
  1. What is the output of `abs(-15)`?

    Answer: 15

    `abs()` returns the absolute value of a number, which is always non-negative.

  2. Which of the following is a valid Python complex number literal?

    Answer: 3+4j

    Python uses `j` (not `i`) as the imaginary unit; `3+4j` is a valid complex literal.

  3. What does `int(3.9)` return?

    Answer: 3

    `int()` truncates toward zero, discarding the fractional part, so `int(3.9)` gives 3.

  4. What is the result of `10 % 3`?

    Answer: 1

    10 divided by 3 is 3 remainder 1, so the modulo operation returns 1.

  5. What is the output of `float('3.14')`?

    Answer: 3.14

    `float()` converts a string representation of a decimal number to a float value.

  6. Which operator performs integer (floor) division in Python?

    Answer: //

    `//` is the floor division operator; it divides and floors the result to the nearest integer.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. pythoninstitute.org — Fees, exam format, passing score, retake fee, score release, time limit, score validity, test delivery, eligibility, retake policy · verified Oct 2026