exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 17 discussion

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

Refer to the exhibit.

The output of a unified diff when comparing two versions of a Python script is shown. Which two `single_request_timeout()` functions are defined in fish.py and cat.py? (Choose two.)
A.

B.

C.

D.

E.

Show Suggested Answer Hide Answer
Suggested Answer: BC

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 3 years, 6 months ago
BC imho
upvoted 40 times
Alan2036
3 years, 5 months ago
I also say BC
upvoted 6 times
...
aprettyparrot
2 years, 6 months ago
Its B+C, the answer of A+B didn't seem right so I just typed it out and actually did the diff. Its fish.py vs cat.py cat.py is missing the "assert" line, while fish.py has it. this is what gives it the "-" fish.py is missing the If statement, whereas cat.py has it, that is why its a "+" the order of the files in the diff call is important.
upvoted 6 times
richard2865
2 years ago
I stared at this endlessly and cannot figure it out. Thanks for taking the time to actually try it. I am just going to have to figure a way to memorize the answer...
upvoted 1 times
...
...
...
ReadTheDoc
Highly Voted 3 years, 5 months ago
B & C is the correct answer.
upvoted 6 times
...
menote
Most Recent 10 months ago
Hi Guys, To be honest with you. For the the questions is not making sense. I did not get it. The output of a unified diff when comparing two versions of a Python script is shown. Which two `single_request_timeout()` functions are defined in fish.py and cat.py? (Choose two.). I see the definition of single_request_timeout() in all the options provided. Maybe am missing something
upvoted 2 times
...
Pateras_
1 year, 1 month ago
C and D are the same, can someone explain to me the difference here. I think it may be a typo.
upvoted 2 times
tonko
9 months, 3 weeks ago
If you are talking about C and E, then the line numbers are different.
upvoted 2 times
...
...
Router
1 year, 4 months ago
BC for me and i think the C & D are the same, correct me if i'm wrong
upvoted 2 times
...
macxsz
1 year, 6 months ago
B and C
upvoted 1 times
...
anonymous1966
1 year, 8 months ago
Correct question without special characters: Which two “single_request_timeout()” functions are defined in fish.py and cat.py? (Choose two.)
upvoted 1 times
...
daloslav
1 year, 8 months ago
Answer is BC - because lines starts at line 160
upvoted 1 times
...
designated
1 year, 9 months ago
The answer is B and C. Each changed line is prepended with either a "+" or a "-" symbol. A line that is prepended with a "-" sign comes from fish.py, while a line with a "+" sign comes from cat.py. In most cases, Git picks fish.py and cat.py in such a way that you can think of fish.py/- as "old" content and cat.py/+ as "new" content. 160 - @single_request_timeout.setter 161 - def single_request_timeout(self,value): 162 - "'''The timeout (seconds) for a single HTTP REST API request." 163 - check_type(value, int, optional=True) "-" value = this line was deleted from fish.py 164 - assert value is None or value > 0 "+" value = this line was added - 165 - if value is not None and value <= 0: "+" value = this line was added - 166 - raise ValueError("single_request_timeout must be positive integer") self._single_request_timeout = value 167 - self._ single_request_timeout = value
upvoted 2 times
...
intf_null0
2 years ago
arggh. Correction to the third paragrapgh in my previous comment which *should* have read: [..] Then as you look at the unified output below, lines starting with a corresponding '-' reference text that exists uniquely in the '--- fish.py' file (ie: "assert value is None or value > 0") whereas the IF statement beginning if value is not None and value <= 0: ..exists in '+++ cat.py' only. [..]
upvoted 1 times
...
intf_null0
2 years ago
The answer is B and C. The first most important thing to note in output from a unified diff is which file is annotated with '---' versus '+++' - namely: --- fish.py +++ cat.py Then as you look at the unified output below, lines starting with a corresponding '-' reference text that exists uniquely in the '--- fish.py' file (ie: "assert value is None or value > 0") whereas the assert code exists in '+++ cat.py' only. Secondly, note the 3rd line of output: "@@ -160,11 +160,12 @@". The -160,12 references lines in fish.py whereas +160,12 references lines in cat.py. This excludes answer E which shows output using line numbers 172 and above.
upvoted 1 times
...
ensxu1214
2 years, 9 months ago
from fish.py, "-" the sentences, and "+" the sentences, becomes cat.py.
upvoted 2 times
...
uerdemk
2 years, 11 months ago
Should be B&C
upvoted 3 times
...
fakrulalam
2 years, 12 months ago
B & C. Created two files cat.py (C) and fish.py(B) and run the diff command. The output is exactly the same as exhibit.
upvoted 3 times
...
Ruley13
3 years ago
B & C
upvoted 3 times
...
bpbenabd
3 years, 1 month ago
B and C.
upvoted 3 times
...
NitinPathak
3 years, 3 months ago
B and C is the correct one
upvoted 5 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 ...