exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 203 discussion

Actual exam question from Cisco's 200-901
Question #: 203
Topic #: 1
[All 200-901 Questions]

Refer to the exhibit.

What is the function of the Python script?

  • A. Loop through the returned list of network devices and, for each device, print the device name and management IP address.
  • B. Count and print the total number of available devices.
  • C. For each device that is returned, display the device type and associated management IP address.
  • D. Iterate over a list of network devices and write all device names and management IP addresses to an output file.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
DavMan
Highly Voted 2 years, 10 months ago
best answer seems A
upvoted 39 times
...
zgcorpuz
Highly Voted 2 years, 2 months ago
A is the correct answer, count of devices is not on the script
upvoted 7 times
...
macxsz
Most Recent 10 months, 1 week ago
Selected Answer: A
Only A makes sense
upvoted 5 times
...
Gngogh
1 year, 10 months ago
I do understand why everyone agrees that A is the correct answer afterall there is a loop in the code, however i am unsure if its A. I actualy think it could be D based on the description available in Realpython https://realpython.com/python-for-loop/ It clearly says that: <iterable> is a collection of objects—for example, a list or tuple. The <statement(s)> in the loop body are denoted by indentation, as with all Python control structures, and are executed once for each item in <iterable>. The loop variable <var> takes on the value of the next element in <iterable> each time through the loop. Therefore data['response'] is an iterable, hence the code iterates over an iterable. Correct answer D.
upvoted 1 times
Valsteve
1 year, 9 months ago
it's the typical cisco trap. the keyword here is the "returned" list. D is speaking of "a" list, A is about the returned list, which is required in this case.
upvoted 4 times
...
Wesgo
1 year, 7 months ago
D is wrong. First, it doesn't get "a list" as input. Second, it doesn't appear to write to an output file.
upvoted 4 times
...
...
kirankkotla
2 years, 1 month ago
Who writes the default answer under that "Reveal Solution" button there? How can it be B(count) at all.
upvoted 3 times
...
alahnomi
2 years, 2 months ago
A is the correct answer
upvoted 4 times
...
[Removed]
2 years, 3 months ago
100% A
upvoted 4 times
...
uerdemk
2 years, 4 months ago
Should be A
upvoted 3 times
...
moslig
2 years, 4 months ago
A is the answer - "hostname" and "managementIPAdress" is printed for every item.
upvoted 3 times
...
TroyMcLure
2 years, 4 months ago
"A" definitely
upvoted 3 times
...
bpbenabd
2 years, 5 months ago
A is the correct answer
upvoted 3 times
...
NitinPathak
2 years, 7 months ago
Seems that most of the ansers are wrong Answer shuld be "A"
upvoted 3 times
...
ananbini0035
2 years, 10 months ago
A is right choice
upvoted 3 times
...
FireTv
2 years, 10 months ago
A is the answer
upvoted 5 times
...
ReadTheDoc
2 years, 10 months ago
I am wondering why the answer is B, there is no mention to any count variable here. So I am with DavMan and tcpip that the answer is deffinitely A. Please correct it
upvoted 2 times
Alan2036
2 years, 10 months ago
A This is my answer
upvoted 3 times
...
...
tcpip
2 years, 10 months ago
A is solution
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago