Exam 350-401 All QuestionsBrowse all questions from this exam
Question 899

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

    Correct Answer: C

    The Python script connects to a device using SSH and executes a command to retrieve information about the BGP routing table. However, the script only prints the output of the command directly to the terminal without exporting or saving the data to a file or any other formatted structure. Therefore, the script simply displays the raw output of the command in an unformatted way.

Discussion
teems5ukOption: A

This part ("exports the routing table information") of the option B makes it wrong in my opinion.

RickAO76Option: 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.

slacker_at_workOption: 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.

a197cbf

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.

a197cbfOption: 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.

SeMo0o0oOption: 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.

ds0321Option: C

i will go with C

ciscoccie20Option: D

should be D!

SeMo0o0oOption: C

A and B are wrong i will go with C

Claudiu1

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

gorillaenhancedOption: B

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.

MizuchanOption: B

I think B is correct if you can agree that exports information=prints the information on the terminal.