โ† 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 `max(3, 1, 4, 1, 5, 9)`?

    Answer: 9

    `max()` returns the largest value among its arguments, which is 9 in this case.

  2. What type does Python assign to the literal `0b1010`?

    Answer: int

    Binary literals prefixed with `0b` are stored as `int` in Python; their type is `int`.

  3. What is the result of `-7 % 3` in Python?

    Answer: 2

    Python's modulo follows floor division; `-7 // 3` is `-3`, and `-7 - (-3 * 3)` = 2.

  4. What does `min(5, 3, 8, 1, 9)` return?

    Answer: 1

    `min()` returns the smallest value among its arguments, which is 1 here.

  5. What is the value of `0xFF` in decimal?

    Answer: 255

    `0xFF` is a hexadecimal literal; F=15 and 0xFF = 15*16 + 15 = 255 in decimal.

  6. What is the result of `pow(2, 10)`?

    Answer: 1024

    `pow(2, 10)` computes 2 raised to the 10th power, which equals 1024.