← All PCAP Flashcard Decks

Standard Library and Built-ins Flashcards

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

Read the first 6 Standard Library and Built-ins flashcards as text
  1. Which module provides tools for working with dates and times in Python?

    Answer: datetime

    The `datetime` module provides classes for manipulating dates and times.

  2. What does `random.randint(1, 10)` return?

    Answer: A random integer from 1 to 10 inclusive

    `random.randint(a, b)` returns a random integer N such that a <= N <= b (both endpoints included).

  3. Which function from the `os` module returns the current working directory?

    Answer: os.getcwd()

    `os.getcwd()` returns the current working directory as a string.

  4. What does `math.floor(3.9)` return?

    Answer: 3

    `math.floor()` returns the largest integer less than or equal to the given number.

  5. Which built-in function returns the number of items in a container?

    Answer: len()

    `len()` returns the number of items in an object such as a list, string, or dictionary.

  6. What does `isinstance(42, int)` return?

    Answer: True

    `isinstance(42, int)` returns True because 42 is an instance of the `int` class.

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 — Eligibility, fees, exam format, passing score, retake fee, retake policy, score release, time limit, score validity, exam information · verified Oct 2026
  2. home.pearsonvue.com — Test delivery · verified Oct 2026