Skip to content

CPNAE-101 Certified Python Network Administrator and Engineer Practice Questions

Prepare for CPNAE-101 with more than an answer.

200 questions in the full set20 sample questionsUpdated Jan 31, 2026
Exam fee
$399 USD
Level
Professional
Valid for
5 years
Domains covered on the exam 4
  1. Requirements and Systems Engineering20%
  2. Python Programming Fundamentals40%
  3. Network Device Management25%
  4. Network Monitoring and Analysis15%
  1. 1

    A developer is writing a Python script to interact with a NETCONF-enabled device. They need to retrieve the running configuration specifically for the interface 'GigabitEthernet1'. Which XML structure represents the correct filter payload to pass to the get-config operation?

    Show answer details

    Correct answer: D

    NETCONF uses XML subtree filtering. To select a specific interface, the filter must match the hierarchy of the data model (interfaces -> interface -> name).

  2. 2

    You are using Matplotlib to visualize network traffic data over a 24-hour period. You have two lists: timestamps (x-axis) and bandwidth_usage (y-axis). Which function call generates a basic line plot of this data?

    Show answer details

    Correct answer: C

    plt.plot(x, y) is the standard Matplotlib function for creating line plots. plt.bar creates bar charts, and plt.scatter creates scatter plots.

  3. 3

    In the context of Requirements Engineering for a network automation system, what is the primary purpose of a 'Traceability Matrix'?

    Show answer details

    Correct answer: D

    A Traceability Matrix maps requirements to other artifacts (like test cases, code modules, or design documents) to ensure that every requirement is implemented and tested, and to analyze the impact of changes.

  4. 4

    You are reviewing a Python script that processes network logs. The script uses the following file opening method:

    file = open('logs.txt', 'r')
    data = file.read()
    # ... processing ...
    file.close()
    

    Why is this approach considered risky compared to using the with statement (context manager)?

    Show answer details

    Correct answer: C

    The with open(...) statement acts as a context manager that guarantees the file is closed even if an exception occurs inside the block. Manual open/close requires a try...finally block to be safe, which is more verbose and error-prone.

  5. 5

    Which of the following data serialization formats is strict about not allowing trailing commas and requiring double quotes for strings, making it a common source of syntax errors in manually edited files?

    Show answer details

    Correct answer: D

    JSON (JavaScript Object Notation) is very strict. It requires double quotes for keys and string values and does not allow trailing commas in arrays or objects. YAML is more lenient with quotes and uses indentation.

  6. 6

    You are leading a network automation project to migrate legacy switch configurations to a controller-based architecture. According to IEEE 29148-2018, you are currently in the process of ensuring that the set of requirements accurately reflects the stakeholders' needs and that the specified system will solve the right problem. Which process are you performing?

    Show answer details

    Correct answer: A

    According to IEEE 29148-2018, Requirements Validation is the process of confirming that the requirements define the right system to meet stakeholder needs (building the right system). Requirements Verification, in contrast, ensures the requirements are written correctly and conform to standards (building the system right).

  7. 7

    A Network Reliability Engineer is designing a CI/CD pipeline for network configuration changes. The pipeline includes a stage where a Python script spins up a virtual topology, applies the proposed configuration, and runs connectivity tests before approving the merge request. Which DevOps testing strategy does this represent?

    Show answer details

    Correct answer: A

    Integration Testing involves testing the interaction between modules or systems. In a network CI/CD context, spinning up a virtual topology to test configurations against a simulated network environment is an integration test, as it verifies the configuration functions correctly within the system context.

  8. 8

    Which of the following statements correctly describes a key difference between the Waterfall and Agile development models when applied to a network automation project?

    Show answer details

    Correct answer: C

    Agile methodologies prioritize iterative development, flexibility, and customer feedback. Waterfall is a linear, sequential approach where requirements are fixed at the start of the project.

  9. 9

    You are writing a Python script to parse a large CSV inventory file containing 50,000 devices. You need to process these devices one by one without loading the entire file into memory to avoid resource exhaustion. Which Python generator pattern should you implement?

    Show answer details

    Correct answer: A

    Using the yield keyword creates a generator function. Generators allow you to iterate over data lazily, processing one item at a time, which is memory-efficient for large datasets compared to loading a full list.

  10. 10

    Review the following Python dictionary representing a network interface:

    interface = {
    'name': 'GigabitEthernet1',
    'enabled': True,
    'ipv4': {
    'address': '192.168.1.1',
    'mask': '255.255.255.0'
    }
    }
    

    Which command successfully extracts the IP address '192.168.1.1'?

    Show answer details

    Correct answer: B

    The dictionary is nested. To access the IP address, you first access the 'ipv4' key, which returns another dictionary, and then access the 'address' key within that inner dictionary.

Create an account to continue.