
CiscoCertified Network Professional Cybersecurity (CBRCOR)
Domain 4Objective 2
4.2 Interpret Basic Scripts Such as Python 350-201 Practice Questions (Page 3)
Part of the Automation domain, which accounts for 20% of the 350-201 exam. Cisco does not publish an official question count, but from its 120-minute exam (~50–80 total, ~10–16 in this domain), expect 1–1 from this objective — we provide 30 practice questions to prepare you well beyond it. (estimate)
30questions here
6free pages
7concepts
20%of the exam
Questions 11–15
- 11
Which Python data type is used to represent a true or false value?
Select an answer first - 12
A security analyst is reviewing a Python script that categorizes network traffic based on port numbers. The script contains: ```python port = 443 if port == 80: print('HTTP') elif port == 443: print('HTTPS') else: print('Other') ``` What is the output?
Select an answer first - 13
A security engineer is running a Python script that parses a list of IP addresses from a file. The script includes the following code: ```python try: with open('ips.txt', 'r') as f: data = f.read() except FileNotFoundError: data = '' ips = data.split('\n') print(len(ips)) ``` If 'ips.txt' does not exist, what is the output?
Select an answer first - 14
A network administrator is troubleshooting a script that reads a configuration file and counts lines containing 'interface'. The script is: ```python with open('config.txt', 'r') as f: lines = f.readlines() count = 0 for line in lines: if 'interface' in line: count += 1 print(count) ``` The file 'config.txt' contains: ``` interface GigabitEthernet0/0 ip address 10.0.0.1 255.255.255.0 interface GigabitEthernet0/1 shutdown ``` What is the output?
Select an answer first - 15
A security engineer is debugging a Python script that appends a timestamp to a log file. The script is: ```python with open('events.log', 'a') as f: f.write('2025-01-01 12:00:00\n') with open('events.log', 'r') as f: lines = f.readlines() print(len(lines)) ``` If 'events.log' already contains 5 lines, what is the output?
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. “350-201” is a trademark of its owner, used for identification only.