Docsity

WGU D522 Task 1 Performance Assessment Guide | Python Network Automation, Device Inventory, Exams of Information Technology

Toggle sidebar
bg1
WGU D522 Task 1 Performance
Assessment Guide | Python Network
Automation, Device Inventory & DNS Audit
| 2026 Updated Edition
Question 1
A company discovers that several workstations are resolving an internal hostname
to an unexpected IP address. What should an incident responder do first?
A. Delete the DNS records
B. Reinstall all affected workstations
C. Identify and preserve relevant evidence
D. Disable the entire DNS infrastructure
Answer: _C. Identify and preserve relevant evidence_
Rationale: Preserving evidence before making major changes helps maintain an
accurate record of what occurred and supports later analysis and remediation.
Question 2
Which Python data structure is most appropriate for storing device information
such as hostname, IP address, operating system, and owner?
A. Tuple only
B. Dictionary
C. Boolean
D. Integer
Answer: _B. Dictionary**_
Rationale: A Python dictionary stores data as key-value pairs, making it well
suited for structured device attributes.
Question 3
What is the primary purpose of a device inventory during incident response?
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32

Partial preview of the text

Download WGU D522 Task 1 Performance Assessment Guide | Python Network Automation, Device Inventory and more Exams Information Technology in PDF only on Docsity!

WGU D522 Task 1 Performance

Assessment Guide | Python Network

Automation, Device Inventory & DNS Audit

| 2026 Updated Edition

Question 1 A company discovers that several workstations are resolving an internal hostname to an unexpected IP address. What should an incident responder do first? A. Delete the DNS records B. Reinstall all affected workstations C. Identify and preserve relevant evidence D. Disable the entire DNS infrastructure Answer: _ C. Identify and preserve relevant evidence _ Rationale: Preserving evidence before making major changes helps maintain an accurate record of what occurred and supports later analysis and remediation. Question 2 Which Python data structure is most appropriate for storing device information such as hostname, IP address, operating system, and owner? A. Tuple only B. Dictionary C. Boolean D. Integer Answer: _ B. Dictionary**_ Rationale: A Python dictionary stores data as key-value pairs, making it well suited for structured device attributes. Question 3 What is the primary purpose of a device inventory during incident response?

A. To replace the organization's backup system B. To generate employee payroll C. To identify and track systems relevant to the investigation D. To encrypt every workstation Answer: _ C. To identify and track systems relevant to the investigation_ Rationale: An accurate inventory helps responders determine which devices may be affected and provides important context for investigation and remediation. Question 4 Which DNS record commonly maps a hostname to an IPv4 address? A. MX B. CNAME C. PTR D. A Answer: _ D. A Rationale: An A record maps a hostname to an IPv4 address. An AAAA record is used for IPv6. Question 5 Which DNS record maps a hostname to an IPv6 address? A. MX B. PTR C. AAAA D. TXT Answer: _ C. AAAA**_ Rationale: AAAA records provide hostname-to-IPv6-address mappings. Question 6 An administrator needs to determine which hostname corresponds to a particular IPv4 address. Which DNS mechanism is most relevant? A. A record lookup B. MX lookup

Answer: _ B. It displays the working tree and staging-state information_ Rationale: git status helps determine which files are modified, staged, untracked, or otherwise different from the repository state. Question 10 Which Git command records staged changes in the local repository? A. git clone B. git pull C. git commit D. git branch - d Answer: _ C. git commit_ Rationale: A commit records the currently staged changes in the local Git history. Question 11 What is the primary purpose of a meaningful Git commit message? A. To encrypt the repository B. To describe the change represented by the commit C. To replace source-code comments D. To create a DNS record Answer: _ B. To describe the change represented by the commit_ Rationale: Clear commit messages make project history easier to understand, review, and audit. Question 12 Which Git command sends local commits to a configured remote repository? A. git status B. git init C. git diff D. git push Answer: _ D. git push

Rationale: git push transfers local commits to a remote repository such as a GitLab project. Question 13 What is the primary role of GitLab in a software or incident-response project? A. It functions exclusively as a DNS server B. It provides repository hosting and collaboration capabilities C. It replaces endpoint antivirus software D. It automatically repairs compromised devices Answer: _ B. It provides repository hosting and collaboration capabilities_ Rationale: GitLab can host repositories and support collaboration, version control, issue tracking, and related development workflows. Question 14 A Python script must process multiple devices returned from an inventory system. Which construct is most appropriate for iterating through each device? A. if only B. for loop C. return only D. import statement Answer: _ B. for loop_ Rationale: A for loop is commonly used to process each item in an iterable such as a list of device records. Question 15 What is the main advantage of using a Python function for repeated API- processing logic? A. It prevents all API failures B. It promotes reusable and organized code C. It eliminates authentication requirements D. It automatically creates DNS records Answer: _ B. It promotes reusable and organized code**_

Rationale: POST is commonly used to submit data for processing or create a new resource, depending on the API design. Question 19 An API returns HTTP status code 404. What does this generally indicate? A. Successful creation B. Authentication success C. The requested resource was not found D. The server successfully deleted the resource Answer: _ C. The requested resource was not found_ Rationale: HTTP 404 indicates that the server could not find the requested resource. Question 20 What does HTTP status code 200 generally indicate? A. Unauthorized B. Server failure C. Resource not found D. Successful request Answer: _ D. Successful request_ Rationale: HTTP 200 is a standard successful-response status code. Question 21 Why should API credentials such as passwords or access tokens not be hard-coded into a Python script? A. Hard-coded credentials improve security B. They may be exposed through source code or version history C. Python cannot process passwords D. Git automatically deletes passwords Answer: _ B. They may be exposed through source code or version history**_ Rationale: Credentials committed to source control can remain in repository history even after the visible file is changed.

Question 22 Which practice is most appropriate for protecting an API token used by a Python application? A. Place it directly in a public repository B. Add it to a README file C. Use a secure secret or environment-variable mechanism D. Include it in every commit message Answer: _ C. Use a secure secret or environment-variable mechanism_ Rationale: Separating secrets from source code reduces the likelihood of accidental exposure. Question 23 A helpdesk API is used during incident response. What information might reasonably be retrieved from it? A. Employee lunch preferences only B. Incident or ticket details relevant to affected devices C. DNS root-server encryption keys D. Git's internal object database Answer: _ B. Incident or ticket details relevant to affected devices_ Rationale: Helpdesk systems commonly contain tickets, incident descriptions, affected assets, status information, and troubleshooting history. Question 24 What is the purpose of correlating helpdesk records with device inventory data? A. To disable GitLab B. To connect reported incidents with specific assets C. To eliminate the need for evidence D. To change all IP addresses automatically Answer: _ B. To connect reported incidents with specific assets**_ Rationale: Correlation allows responders to connect user reports or tickets with particular systems and inventory attributes.

Question 28 After correcting an incorrect DNS record, why might a client still resolve the old address? A. Git has overwritten the DNS server B. A cached DNS response may still be valid C. Python prevents DNS updates D. The MX record controls all DNS queries Answer: _ B. A cached DNS response may still be valid_ Rationale: DNS caching can cause clients or intermediate resolvers to continue using a previous response until its cache lifetime expires or the cache is otherwise cleared. Question 29 Which command-line utility can commonly be used to query DNS information? A. git B. python C. nslookup D. mkdir Answer: _ C. nslookup_ Rationale: nslookup is a commonly available command-line tool for querying DNS information. Question 30 What is the primary purpose of dig? A. Manage Git branches B. Perform detailed DNS queries and display DNS information C. Modify Python packages D. Create helpdesk tickets Answer: _ B. Perform detailed DNS queries and display DNS information**_ Rationale: dig is designed for querying DNS servers and examining DNS responses in detail.

Question 31 Which DNS record type is commonly used to identify mail servers for a domain? A. A B. PTR C. CNAME D. MX Answer: _ D. MX** Rationale: MX records specify mail-exchange servers responsible for receiving email for a domain. Question 32 What is the primary purpose of a CNAME record? A. Map an IP address to a hostname B. Identify a mail server C. Create an alias for another hostname D. Store an IPv6 address directly Answer: _ C. Create an alias for another hostname_ Rationale: CNAME records allow one hostname to act as an alias pointing to another canonical hostname. Question 33 An incident responder wants to determine whether a suspicious hostname resolves consistently to the expected address. What should be performed? A. Delete the hostname B. Perform DNS resolution and compare the returned result with expected data C. Reformat the workstation D. Remove the Git repository Answer: _ B. Perform DNS resolution and compare the returned result with expected data_ Rationale: Verification requires comparing observed DNS responses with the organization's known-good configuration.

Question 37 A REST API temporarily returns HTTP 500. What does this generally indicate? A. The client successfully authenticated B. The requested resource was found C. A server-side error occurred D. The DNS record is necessarily incorrect Answer: _ C. A server-side error occurred_ Rationale: HTTP 500 indicates a general internal server error. It does not by itself prove that DNS or authentication is responsible. Question 38 Why should an incident-response script log important operations? A. Logging guarantees that the incident cannot recur B. Logs provide a record of actions and results that can support troubleshooting and auditing C. Logs replace evidence preservation D. Logs eliminate the need for testing Answer: _ B. Logs provide a record of actions and results that can support troubleshooting and auditing_ Rationale: Appropriate logging provides visibility into what the script attempted and what happened during execution. Question 39 Which item is most useful when documenting a DNS remediation? A. The analyst's personal opinion only B. Original state, corrective action, timestamp, and validation result C. An unrelated Git commit D. A list of employee birthdays Answer: _ B. Original state, corrective action, timestamp, and validation result**_ Rationale: These details create a traceable record of the problem, action taken, and evidence that the remediation worked.

Question 40 What is the primary purpose of an evidence guide in an incident-response task? A. To replace technical remediation B. To explain what evidence was collected and how it supports the required findings C. To hide unsuccessful tests D. To remove the need for source control Answer: _ B. To explain what evidence was collected and how it supports the required findings_ Rationale: An evidence guide connects artifacts, screenshots, logs, code output, and other records to the claims or requirements they substantiate. Question 41 Which Python library is commonly used to make HTTP requests to REST APIs? A. math B. random C. requests D. statistics Answer: _ C. requests_ Rationale: The Python requests library provides a convenient interface for sending HTTP requests to web services and APIs. Question 42 When an API returns JSON, which Python method can commonly convert the response body into Python data structures when using the requests library? A. response.text() B. response.json() C. response.parse() D. response.decode_json() Answer: _ B. response.json()_

Rationale: HTTP 201 Created indicates that a request successfully resulted in creation of a resource. Question 46 Why should an API response be checked before attempting to process its contents? A. APIs never return errors B. The response may indicate an error or unexpected data C. Python automatically fixes every response D. DNS requires HTTP 201 Answer: _ B. The response may indicate an error or unexpected data_ Rationale: Checking status codes and response content helps prevent the application from incorrectly processing failed requests. Question 47 Which Python statement is commonly used to conditionally execute code? A. for B. import C. if D. class Answer: _ C. if Rationale: An if statement evaluates a condition and executes code when that condition is true. Question 48 What is the purpose of a Python try block? A. To create a Git repository B. To contain code that may raise an exception C. To configure DNS D. To permanently suppress errors Answer: _ B. To contain code that may raise an exception**_ Rationale: Code placed inside a try block can be monitored for exceptions that are subsequently handled by appropriate exception-handling clauses.

Question 49 Which Python keyword is used to handle an exception after a try block? A. catch B. error C. except D. handle Answer: _ C. except** Rationale: Python uses except clauses to define how specified exceptions should be handled. Question 50 What is a major benefit of validating input to a Python script? A. It eliminates every security threat B. It reduces errors caused by unexpected or invalid input C. It automatically creates backups D. It prevents all network failures Answer: _ B. It reduces errors caused by unexpected or invalid input_ Rationale: Input validation helps ensure that data conforms to expected formats and values before processing. Question 51 Which data type represents a collection of ordered values that can be modified in Python? A. Tuple B. String C. List D. Boolean Answer: _ C. List Rationale: Python lists are ordered, mutable collections that can contain multiple values.

Question 55 What does len(devices) generally return if devices is a Python list? A. The last device B. The number of elements in the list C. The memory address of the list D. The first element Answer: _ B. The number of elements in the list_ Rationale: Python's len() function returns the number of items in a collection. Question 56 What is the purpose of comments in Python code? A. They execute network requests B. They explain code to human readers without being executed C. They encrypt variables D. They replace testing Answer: _ B. They explain code to human readers without being executed_ Rationale: Comments provide context and documentation for developers and reviewers. Question 57 Which practice improves Python code maintainability? A. Repeating identical code everywhere B. Using unexplained variable names C. Using descriptive names and modular functions D. Removing all documentation Answer: _ C. Using descriptive names and modular functions**_ Rationale: Clear naming and modular design make code easier to understand, test, modify, and reuse. Question 58 What is the purpose of a Python module import?

A. To delete source code B. To make functionality from another module available to the program C. To create a DNS zone D. To commit code to GitLab Answer: _ B. To make functionality from another module available to the program_ Rationale: Import statements allow Python programs to use functions, classes, and variables defined in modules. Question 59 Which command commonly displays the installed Python version? A. python --dns B. python --version C. python --git D. python --api Answer: _ B. python --version Rationale: The --version option displays the Python interpreter version. Question 60 What is the primary purpose of a virtual environment in Python? A. To create virtual DNS servers B. To isolate project-specific Python packages and dependencies C. To encrypt Git repositories D. To replace an operating system Answer: _ B. To isolate project-specific Python packages and dependencies**_ Rationale: Virtual environments help prevent dependency conflicts between Python projects. Question 61 What is the purpose of a Git branch? A. To create a DNS alias B. To provide an independent line of development