exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 899 discussion

Actual exam question from Cisco's 350-401
Question #: 899
Topic #: 1
[All 350-401 Questions]



Refer to the exhibit. Which action does the Python script accomplish?

  • A. connects to the device using Telnet and exports the routing table information
  • B. connects to the device using SSH and exports the routing table information
  • C. displays the output of the show command in an unformatted way
  • D. displays the output of the show command in a formatted way
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
slacker_at_work
Highly Voted 1 year, 1 month ago
Selected Answer: B
It's either B or C, I would go for B: scripts establishes an SSH connection to the device and executes "show ip bgp 192.168.101.0 bestpath" to retrieve information about the BGP routing table.
upvoted 5 times
a197cbf
9 months, 2 weeks ago
I'm under the assumption that "exporting" the data requires it to be saved to an object or file, in which case B is wrong. the print( ) statement just displays it to the command line instead, so I think C is the better choice here.
upvoted 1 times
...
...
zbeugene7
Most Recent 6 months, 1 week ago
Gotta be B it connects to the device first using SSH , it must be B. C describes the second part only.
upvoted 2 times
...
chiacche
7 months, 1 week ago
Selected Answer: C
output = stdout.read() # Read the raw output from stdout print(output) # This will print the formatted output as a string
upvoted 1 times
...
4121e3c
8 months, 2 weeks ago
Selected Answer: B
B is correct. the output of print is just object and does not show anything. to show the inside of object it needs readlines method, like print(stdout.readlines()). the routing table is exporting to the stdout object. the output without readlines() is like this : <paramiko.ChannelFile from <paramiko.Channel 0 (open) window=2097152 -> <paramiko.Transport at 0x8fbccb50 (cipher aes128-ctr, 128 bits) (active; 1 open channel(s))>>>
upvoted 2 times
...
ebulating
8 months, 3 weeks ago
Selected Answer: C
This questions hinges on the semantic difference between export and display.
upvoted 1 times
...
a197cbf
9 months, 2 weeks ago
Selected Answer: C
Choosing C going by this logic: A: Obviously wrong because Telnet is not port 22 B: Although correct where it says it's using SSH, "exports" the routing table sounds wrong because the code just does a standard print(stdout) command. That just outputs to the command line. If the code was to export the file, there should be some file.open() and file.close() commands to actually pump the stdout data into a file, or at least to another object type C: Correct answer going by this logic. The output is displayed with no formatting. If it was to be displayed in a formatted way, I'd expect to see something similar to a "for" loop where it can read each line of the stdout and write it accordingly, or at least some string formatting commands. There are none to hint at that in the code. D: Wrong because there doesn't seem to be any formatting commands on the stdout before or while printing it to the command line.
upvoted 4 times
...
[Removed]
10 months, 2 weeks ago
Selected Answer: C
it´s C The script prints the raw stdout object, which means it simply prints the raw command output without any formatting to the output. B is incorrect, because it dosen´t export the routing table information, it just retrieves and prints specific BGP information.
upvoted 3 times
...
ds0321
10 months, 3 weeks ago
Selected Answer: C
i will go with C
upvoted 3 times
...
[Removed]
11 months ago
A and B are wrong i will go with C
upvoted 1 times
...
RickAO76
1 year ago
Selected Answer: C
it's not exporting 'stdout' anywhere - it's just printing it. I'm going to have to say it's C. Now if Cisco wants to non-nonchalantly change what they mean by 'export', that might be the case - but I'm sticking with C.
upvoted 4 times
...
Claudiu1
1 year, 1 month ago
same question but different answers here: https://www.examtopics.com/discussions/cisco/view/52431-exam-350-401-topic-1-question-309-discussion/ Based on that question A and B are wrong. It is either C or D
upvoted 1 times
SwitchKiller
2 months, 1 week ago
In Q309 the Answers are different, so in that instance 'A' was the best answer
upvoted 1 times
...
...
gorillaenhanced
1 year, 2 months ago
printing stdout will give smth like : "<paramiko.ChannelFile from <paramiko.Channel 0 (open) window=8192 -> <paramiko.Transport at 0x3e51dd8 (cipher aes128-cbc, 128 bits) (active; 1 open channel(s))>>>" need to read lines through "stdout.readlines()" then you can print in the terminal. c/c : nothing is print to the screen and B seems to be the best option.
upvoted 1 times
...
Mizuchan
1 year, 3 months ago
Selected Answer: B
I think B is correct if you can agree that exports information=prints the information on the terminal.
upvoted 2 times
...
teems5uk
1 year, 3 months ago
This part ("exports the routing table information") of the option B makes it wrong in my opinion.
upvoted 4 times
...
ciscoccie20
1 year, 3 months ago
should be D!
upvoted 2 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