200-901 · Question #510
Refer to the exhibit. An engineer is comparing two files by using the unified diff format. What is determined by the content in the file2.py file?
The correct answer is A. Line 93 of file.py is 'DEVICE-STATS'. In unified diff format, lines prefixed with '-' belong to the original file (file.py/file1) and lines prefixed with '+' belong to the new file (file2.py). The chunk header '@@ -a,b +c,d @@' indicates starting line numbers: '-a' is the starting line in the original file and '+c'…
Question
Refer to the exhibit. An engineer is comparing two files by using the unified diff format. What is determined by the content in the file2.py file?
Exhibit
Options
- ALine 93 of file.py is 'DEVICE-STATS'.
- BLine 92 of file2.py is 'DEVICE-STATS'.
- CLine 16 of file2.py is auth=HTTPBasicAuth(USERNAME, PASSWORD).
- DLine 17 of file2.py is auth = HTTPBasicAuth(USERNAME, PASSWORD).
How the community answered
(26 responses)- A77% (20)
- B4% (1)
- C8% (2)
- D12% (3)
Explanation
In unified diff format, lines prefixed with '-' belong to the original file (file.py/file1) and lines prefixed with '+' belong to the new file (file2.py). The chunk header '@@ -a,b +c,d @@' indicates starting line numbers: '-a' is the starting line in the original file and '+c' is the starting line in the new file. A line showing '-DEVICE-STATS' means that string existed in file.py (the original) at line 93, and was removed or changed in file2.py. The exhibit's diff content confirms that 'DEVICE-STATS' appears as a removed line from file.py, making Choice A correct. The other choices misattribute lines or filenames based on misreading the diff header and prefix conventions.
Topics
Community Discussion
No community discussion yet for this question.
