ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 285 - SK0-005 discussion

Report
Export

An administrator discovers a misconfiguration that impacts all servers but can be easily corrected.

The administrator has a list of affected servers and a script to correct the issue. Which of the following scripting principles should the administrator use to cycle through the list of servers to deliver the needed change?

A.
Linked list
Answers
A.
Linked list
B.
String
Answers
B.
String
C.
Loop
Answers
C.
Loop
D.
Constant
Answers
D.
Constant
Suggested answer: C

Explanation:

A loop is a programming construct that allows a block of code to be executed repeatedly until a certain condition is met1. A loop can be used to cycle through a list of servers and run a script on each one of them. For example, in Python, a loop can be written as:

Python This code is AI-generated. Review and use carefully. Visit our FAQ for more information.

Copy # Assume servers is a list of server names for server in servers:

# Run the script on the server run_script(server)

A loop can help automate the task of correcting the misconfiguration on all servers, saving time and effort.

asked 02/10/2024
mckeon mackey
31 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first