200-901 exam dumps

200-901 practice question 169 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 169

Single answer

A development team is collaborating on a Python script stored in a Git repository. A teammate has submitted a pull request, and you are reviewing the changes using the unified diff format. The diff output for one of the files is shown below:

@@ -10,7 +10,7 @@ def calculate_sum(a, b): # Perform addition return a + b

-# Removed debug print statement +# Added logging functionality import logging logging.basicConfig(level=logging.INFO)

What does the unified diff indicate about the changes made to the file?

  1. A

    A debug print statement was removed, and logging functionality was added.

  2. B

    The calculate_sum function was removed and replaced with logging functionality.

  3. C

    Logging functionality was added, but there were no changes to the calculate_sum function.

  4. D

    The calculate_sum function was modified to include logging functionality.

Show answer and explanation

Correct answer: A

Explanation

Unified diff format shows changes in a file with '-' indicating removed lines and '+' indicating added lines. In this case, the diff indicates that a debug print statement was removed and replaced with logging functionality. There are no changes to the calculate_sum function itself.

  • A. Correct.

    This is correct because the unified diff shows that a debug print statement was removed (line starting with '-') and logging functionality was added (line starting with '+').

  • B. Incorrect.

    This is incorrect because the calculate_sum function was not removed or replaced. The changes only pertain to adding logging functionality.

  • C. Incorrect.

    This is incorrect because the calculate_sum function remains unchanged, but the diff explicitly shows that a debug print statement was removed.

  • D. Incorrect.

    This is incorrect because the calculate_sum function was not modified; the changes only involved removing a debug print statement and adding logging functionality.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam