
CiscoCertified Network Professional Cybersecurity (CBRCOR)
Domain 4Objective 2
4.2 Interpret Basic Scripts Such as Python 350-201 Practice Questions (Page 5)
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 21–25
- 21
A network engineer is reviewing a Python script that determines the status of a network device. The script is: ```python status = 'active' if status: print('Device is up') else: print('Device is down') ``` What is the output?
Select an answer first - 22
A network engineer is running a Python script that processes a list of IP addresses and attempts to connect to each one. The script is: ```python import socket ips = ['192.168.1.1', '192.168.1.2', 'invalid_ip'] for ip in ips: try: socket.gethostbyaddr(ip) print(ip + ': resolved') except socket.herror: print(ip + ': no reverse DNS') except socket.gaierror: print(ip + ': invalid address') ``` What is the output for the third IP address 'invalid_ip'?
Select an answer first - 23
Which Python built-in function is used to open a file for reading or writing?
Select an answer first - 24
A security analyst is reviewing a Python script that checks if a list of ports contains any open ports. The script is: ```python ports = [22, 80, 443] open_ports = [] for port in ports: if port in [22, 443]: open_ports.append(port) print(len(open_ports)) ``` What is the output?
Select an answer first - 25
What is the data type of the value assigned to the variable `port` in the statement `port = 443`?
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.