Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
Cisco logo

CiscoCertified Network Associate Automation (CCNA Automation)

Domain 1Objective 5

5. Explain the Benefits of Organizing Code into Methods / Functions, Classes, and Modules 200-901 Practice Questions (Page 4)

Part of the 1.0 Software Development and Design domain, which accounts for 15% of the 200-901 exam. Cisco does not publish an official question count, but from its 120-minute exam (~50–80 total, ~8–12 in this domain), expect 1–2 from this objective — we provide 40 practice questions to prepare you well beyond it. (estimate)

40questions here
8free pages
4concepts
15%of the exam

Questions 16–20

  1. 16foundation · easy

    How does organizing code into small functions and classes primarily improve the testing process?

    Select an answer first
  2. 17application · medium

    A junior developer wrote a Python script that configures interfaces on a router. The script has a 50-line block that validates an IP address and subnet mask, and this block appears in three different functions. A senior engineer asks the developer to refactor the code. What is the primary benefit of extracting this repeated block into a single function?

    Select an answer first
  3. 18expert · hard

    A network automation team is refactoring a monolithic Python script into a modular structure. The script currently has a function that both parses device data and writes the parsed data to a database. The team wants to improve testability and allow the parsing logic to be reused in a different context. What is the best refactoring strategy?

    Select an answer first
  4. 19application · medium

    A network automation engineer writes a Python script that configures VLANs on multiple switches. The same block of code that builds the VLAN configuration payload appears in three different parts of the script. After a firmware upgrade, the payload format changes, and the engineer must update all three copies. Which code organization change would most directly reduce the maintenance burden?

    Select an answer first
  5. 20application · medium

    A network automation team is writing unit tests for a Python script that processes device inventory data. The script currently has all logic in a single main() function that reads a file, parses data, and writes output. The team wants to test the parsing logic independently without running the entire script. Which refactoring step is most effective?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by Cisco. “200-901” is a trademark of its owner, used for identification only.