
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 6)
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 26–30
- 26
A network automation engineer is troubleshooting a Python script that configures multiple devices. The script has a function that sends configuration commands, but sometimes it fails on certain devices due to authentication errors. The engineer wants to add logging to the function to capture which device failed and why, without affecting the rest of the script. What is the best approach?
Select an answer first - 27
A junior developer on your team writes a Python script that configures interfaces. The script contains a 200-line block of code that validates IP addresses, and this block appears in several places. The senior developer asks the junior to refactor the script. What is the primary benefit of extracting that block into a function named 'validate_ip'?
Select an answer first - 28
A network automation engineer maintains a Python script that configures hundreds of devices. The script currently has a single function that performs all steps: connect, parse config, apply changes, and verify. The engineer needs to add a new verification method that only applies to a subset of devices. The team also wants to unit-test the verification logic without connecting to real devices. What is the best refactoring approach?
Select an answer first - 29
What is a primary benefit of using modules in a Python project?
Select an answer first - 30
A team develops a Python library that manages network devices. They want to prevent external code from directly modifying the device's hostname attribute, and instead require validation before any change is applied. Which object-oriented programming feature best supports this requirement?
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.