nerdexam
Cisco

300-615 · Question #274

Refer to the exhibit. The script must show the running configuration of interfaces eth1/1 to eth1/3. However, only a subset of interfaces is displayed when the script is run. Which configuration…

The correct answer is B. n=1. The script is intended to show the running configuration of interfaces eth1/1 to eth1/3. The problem occurs because the initial value of n is set to 2 on line 2, so the loop starts at eth1/2 instead of eth1/1. By changing the value of n to 1, the script will begin displaying…

Automation

Question

Refer to the exhibit. The script must show the running configuration of interfaces eth1/1 to eth1/3. However, only a subset of interfaces is displayed when the script is run. Which configuration must be changed on line 2 of the script to resolve the problem?

Options

  • An=-1
  • Bn=1
  • Cn=-2
  • Dn=0

How the community answered

(49 responses)
  • A
    8% (4)
  • B
    73% (36)
  • C
    2% (1)
  • D
    16% (8)

Explanation

The script is intended to show the running configuration of interfaces eth1/1 to eth1/3. The problem occurs because the initial value of n is set to 2 on line 2, so the loop starts at eth1/2 instead of eth1/1. By changing the value of n to 1, the script will begin displaying the configuration from eth1/1.

Topics

#Python scripting#NX-OS automation#interface configuration#array indexing

Community Discussion

No community discussion yet for this question.

Full 300-615 Practice