Free CompTIA AT0-001 Practice Questions 2026 - Page 7
Automation Coding Concepts
A script works on one runner but fails because a library is missing on another. What should be corrected?
A. Dependency installation from the declared specification
B. DNS TTL only
C. API DELETE method
D. Branch naming only
Answer Option (Which option is correct) A. Dependency installation from the declared specification
Explanation:
Each runner should install the dependencies declared for the application rather than relying on packages that happen to be present. Selecting the correct environment and installation specification makes the required library available consistently. This addresses the observed difference between runners instead of hiding the missing dependency.
Why the other options are incorrect:
B. DNS TTL only:
DNS TTL controls cached name answers. It does not install a missing Python library. The runner's dependency environment remains incomplete.
C. API DELETE method:
DELETE requests resource removal through an API. It does not resolve the local missing-library error. Installing declared dependencies addresses the actual failure.
D. Branch naming only:
Branch naming describes repository organization. It does not supply runtime libraries to a runner. The dependency installation step must be corrected.
References:
Python: virtual environments
pip: repeatable installations
Python runs range(3) and appends each number to an empty list. What list results?
A. [0,1,2]
B. [1,2,3]
C. [3]
D. [0,1,2,3]
Answer Option (Which option is correct) A. [0,1,2]
Explanation:
range(3) generates integers starting at zero and stopping before three. Appending each generated number to an empty list preserves their iteration order. The resulting list is [0,1,2].
Why the other options are incorrect:
B. [1,2,3]:
1,2,3 starts at one rather than the default zero. range with only a stop argument starts at zero. The supplied loop therefore produces different values.
C. [3]:
3 is a single value at the excluded endpoint. The loop iterates each earlier range element. Appending preserves all those elements.
D. [0,1,2,3]:
0,1,2,3 includes the stop value. Python ranges exclude that endpoint. Only the preceding integers are appended.
References:
Python: functions and control flow
Python: built-in types
Python evaluates bool(0). What does it return?
A. An empty dictionary
B. FALSE
C. TRUE
D. 0 as a string
Answer Option (Which option is correct) B. FALSE
Explanation:
Python treats numeric zero as false in a Boolean context. bool(0) therefore returns False, which the source option displays as FALSE. This conversion reports truth value and does not convert the number into the string "0".
Why the other options are incorrect:
A. An empty dictionary:
An empty dictionary is a different object type. bool returns a Boolean result. It does not construct a dictionary from zero.
C. TRUE:
True contradicts numeric-zero truth testing. Zero is false in Python. The conversion therefore yields the other Boolean value.
D. 0 as a string:
A string containing zero is not the result type of bool. The expression converts truth value rather than textual representation. It returns a Boolean.
References:
Python: built-in types
Python: functions and control flow
A developer stages one file then modifies it again before committing. Which content is committed normally?
A. The staged snapshot
B. All current working-tree content automatically
C. Only remote content
D. No content ever
Answer Option (Which option is correct) A. The staged snapshot
Explanation:
An ordinary commit records the index content, not every current working-tree edit. The version staged before the later modification remains in the index until another staging operation updates it. The later edit normally remains outside that commit.
Why the other options are incorrect:
B. All current working-tree content automatically:
All working-tree content includes changes made after staging. A normal commit does not automatically include those unstaged edits. The index snapshot determines the recorded content.
C. Only remote content:
Remote content is not the default source of a local commit snapshot. The staged index is local. Upstream state does not replace the selected local content.
D. No content ever:
No content would ignore the staged snapshot. Staging explicitly prepares file content for the commit. Later unstaged edits do not erase that snapshot.
References:
Git: git commit
A failed merge resolution passes syntax checks but changes behavior. What should follow before publishing?
A. Delete all tests
B. Run relevant behavior tests and review the resolution
C. Publish because parsing passed
D. Force every remote branch
Answer Option (Which option is correct) B. Run relevant behavior tests and review the resolution
Explanation:
Syntax checks establish that the resolved code can be parsed, but do not establish that its behavior is correct. Review the merge decisions and run tests covering the affected behavior before publication. This detects logical changes introduced while combining the competing edits.
Why the other options are incorrect:
A. Delete all tests:
Deleting tests removes checks of the changed behavior. It does not establish that the merge is correct. Relevant tests should run before publishing.
C. Publish because parsing passed:
Parsing success establishes syntactic validity only. The resolved code can still implement incorrect behavior. Functional validation is still needed.
D. Force every remote branch:
Forcing every branch affects repository references. It does not validate the merge's behavior. It also risks unrelated shared work.
References:
Git: git merge
Microsoft: types of testing
State locking helps prevent concurrent conflicting changes to shared infrastructure state.
A. TRUE
B. FALSE
Answer Option (Which option is correct) A. True
Explanation:
Locking serializes operations against shared state.
Why the other options are incorrect:
B. False:
False would dismiss the serialization benefit. A supported state lock prevents overlapping writers from applying changes simultaneously. This reduces conflicting updates to shared state.
References:
Terraform: state locking
Choose TWO controls for shared IaC state.
A. Anonymous public write access
B. Restricted state access
C. Uncoordinated concurrent updates
D. State locking
D. State locking
Answer Option (Which option is correct) B. Restricted state access
Answer Option (Which option is correct) D. State locking
Explanation:
Option B restricts who can read or change shared state, which may contain sensitive resource information. Option D prevents cooperating state-changing operations from running concurrently against the same locked state. Access controls protect authority and confidentiality, while locking protects consistency during updates.
Why the other options are incorrect:
A. Anonymous public write access:
Public write access allows uncontrolled state modification. It undermines ownership and integrity. Shared state should have restricted permissions.
C. Uncoordinated concurrent updates:
Uncoordinated updates can race over the same state. Neither worker may see the other's current changes. Locking or coordination prevents that overlap.
References:
Terraform: state locking
AWS IAM: security best practices
Order a managed configuration change with review.
|
Verify actual state and service health
Validate and review the proposed change
Edit desired configuration
Apply the approved change
|
|
Supplied source solution: B. Edit desired configuration -> A. Validate and review the proposed change -> C. Apply the approved change -> D. Verify actual state and service health
Explanation:
Edit the desired configuration before generating and reviewing the proposed change. Apply it only after validation and approval, then verify the actual state and service health. The final verification checks the result of the applied change rather than assuming successful execution proves the service is healthy. Import review: The source solution is preserved above. The sample does not establish the application's Ordering answer representation, so the existing answer-storage fields remain unchanged.
Why the other options are incorrect:
Not applicable: the supplied items are sequence steps or matching choices, rather than incorrect distractors.
References:
Terraform: infrastructure as code
Ansible: playbooks and pull execution
Match network needs to components.
Forward between networks
Distribute backend traffic
Resolve a host name
A. Load balancer
B. Router
C. DNS
Supplied source solution: Forward between networks -> B. Router; Distribute backend traffic -> A. Load balancer; Resolve a host name -> C. DNS
Explanation:
Forwarding between networks maps to B, router, which selects paths for network traffic. Distributing requests across backends maps to A, load balancer. Resolving a host name maps to C, DNS. These components solve different connectivity requirements and should not be substituted for one another. Import review: The source solution is preserved above. The sample does not establish the application's ColumnMatch answer representation, so the existing answer-storage fields remain unchanged.
Why the other options are incorrect:
Not applicable: the supplied items are sequence steps or matching choices, rather than incorrect distractors.
References:
AWS VPC: route tables
AWS load balancing: target health checks
AWS Route 53: record values and TTL
A new subnet overlaps an existing connected network. What should the operator do?
A. Change commit messages
B. Add a duplicate route
C. Disable TLS
D. Choose a non-overlapping address range
Answer Option (Which option is correct) D. Choose a non-overlapping address range
Explanation:
Connected networks need an addressing plan that supports unambiguous routing. An overlapping range can conflict with an existing network and is disallowed for arrangements such as VPC peering. Choose a suitable non-overlapping range before deploying the new subnet and its routes.
Why the other options are incorrect:
A. Change commit messages:
Commit messages describe recorded changes. Editing them does not change IP address allocation. The overlapping ranges remain.
B. Add a duplicate route:
A duplicate route does not make overlapping destinations unique. It may add another ambiguous forwarding choice. The address plan itself needs correction.
C. Disable TLS:
Disabling TLS weakens transport security. It cannot distinguish overlapping network prefixes. The subnet range must be changed.
References:
AWS VPC: peering and overlapping CIDRs
| Page 7 out of 22 Pages |