Automation Practice Questions¶
15 original questions covering ENCOR 6.1 to 6.7. Answer every one before opening any explanation. Target: 12 of 15 (80%). None of these repeat the domain 6 questions in ENCOR Bank Part 2, so use both.
1. Refer to the exhibit. What does the script print?
Blueprint 6.1
vlans = {"10": "USERS", "20": "VOICE", "99": "MGMT"}
result = []
for v in vlans:
if int(v) < 50:
result.append(v)
print(result)
- A.
['USERS', 'VOICE'] - B. A
TypeError, because a dictionary cannot be used in aforloop - C.
[10, 20] - D.
['10', '20']
Answer: D
Looping over a dictionary yields its keys, not its values, so v takes the values "10", "20" and "99". int(v) converts each key for the comparison only, and append(v) adds the original string, so the list holds strings and prints with quotes. The values (A) would need vlans.values() or vlans.items(). Dictionaries are iterable (B).
2. Refer to the exhibit. What is the result of running the script?
Blueprint 6.1
devices = ["R1", "R2", "SW1"]
print("start")
for i in range(len(devices) + 1):
print(devices[i])
print("end")
- A. It prints
start, R1, R2, SW1 andend - B. It prints
start, R1, R2 and SW1, then stops with anIndexError - C. It prints nothing and reports an
IndexError - D. It prints
start, then stops with aSyntaxError
Answer: B
range(4) produces 0, 1, 2 and 3. Indexes 0 to 2 print the three names, and index 3 is past the end of a three-item list, which raises IndexError at runtime. Everything printed before the error still appears, but end never runs. Option C describes a parse-time error, which an index problem is not. The code has no syntax errors (D).
3. Refer to the exhibit. What does the script print?
Blueprint 6.1, 6.2
import json
body = {"name": "Gi2", "enabled": False, "mtu": None, "vlans": (10, 20)}
print(json.dumps(body))
- A.
{"name": "Gi2", "enabled": false, "mtu": null, "vlans": [10, 20]} - B.
{'name': 'Gi2', 'enabled': False, 'mtu': None, 'vlans': (10, 20)} - C.
{"name": "Gi2", "enabled": "False", "mtu": "None", "vlans": [10, 20]} - D. A
TypeError, because tuples cannot be converted to JSON
Answer: A
json.dumps produces a JSON string: double quotes, False becomes false, None becomes null, and a tuple becomes a JSON array. B is how Python prints the dictionary itself, not JSON. Booleans and null are not quoted in JSON (C). Tuples serialise as arrays; it is a set that raises TypeError (D).
4. An engineer must send this data to RESTCONF: the IETF interface Loopback20, enabled, with one IPv4 address 10.20.20.1 mask 255.255.255.255. Which payload is valid?
Blueprint 6.2
-
A.
-
B.
-
C.
-
D.
Answer: C
address is a YANG list, so it must be a JSON array of objects even with one entry, and enabled is a boolean, so it is unquoted. A quotes the boolean, making it a string that fails YANG type validation. B writes the list as a single object instead of an array. D has a trailing comma after the last array item, which is invalid JSON.
5. Which two statements describe benefits of using a YANG data model rather than CLI screen scraping? (Choose two.)
Blueprint 6.3
- A. The device can validate a whole change against types, ranges and mandatory nodes before applying it
- B. YANG encrypts configuration data in transit
- C. Configuration and read-only operational data are clearly separated in the model
- D. YANG removes the need for a transport protocol such as NETCONF or RESTCONF
- E. YANG models guarantee that every vendor's native configuration is identical
Answer: A, C
A model defines types and constraints, so the server validates requests before applying them, and config true and config false separate configuration from state. YANG is a modeling language; encryption comes from SSH or TLS (B), and YANG still needs a protocol to carry the data (D). Standard models such as IETF and OpenConfig improve consistency, but vendors' native models differ (E).
Free account required for the rest
This page has 15 questions and the first 5 are shown here. You're seeing a free sample. A free account unlocks everything: every question bank, the timed exams, the cram sheets, the simulations and the lab files.
Unlock the full question banks and cram sheets
A free account opens every question bank, the timed practice exams, the printable cram sheets, all the simulations and the lab files. Without one you see a 5-question sample of each.
No card needed. Study tips by email are optional and off unless you tick the box. Your address is never sold or shared. Privacy policy ยท Terms
Signed in as . Your account
You're on the free account, so lessons after the first module, question banks, exams and cram sheets show a sample. See Track Pass and All-Access
Also from NetManager Systems: NetManager, network monitoring for multi-vendor networks. Try the NetManager, NetDiag, PCAP Analyzer and OpsDash demos: every new account gets a free 7-day read-only login to each.