200-901: DevNet Associate (DEVASC) Part 1
Question #: 1
Topic #: 1
Which two concepts describe test-driven development? (Choose two.)
A. User acceptance testers develop the test requirements.
B. It enables code refactoring.
C. Tests are created when code is ready for release.
D. Implementation is driven by incremental testing of release candidates.
E. Write a test before writing code.
Selected Answer: BE
Question #: 2
Topic #: 1
Which task is performed because the test-driven development approach is being used?
A. creating test scenarios based on continuous development
B. writing code without committing any coding violations
C. refactoring code that is covered by existing tests
D. testing existing software before developing new code
Selected Answer: C
Question #: 3
Topic #: 1
What is the first development task in test-driven development?
A. Write code that implements a desired function.
B. Write a failing test case for a desired function.
C. Reverse engineer the code for a desired function.
D. Write a passing test case for existing code.
Selected Answer: B
Question #: 4
Topic #: 1
In test-driven development, what are two of the green bar patterns? (Choose two.)
A. another test
B. break
C. triangulate
D. starter test
E. fake it
Selected Answer: CE
Question #: 5
Topic #: 1
In the test-driven development model, what is changed after a test fails?
A. schedule
B. project requirements
C. code
D. test
Selected Answer: C
Question #: 6
Topic #: 1
What is a benefit of test-driven development?
A. strict adherence to product requirements
B. faster releases that have minimal features
C. early customer involvement
D. increased code quality
Selected Answer: D
Question #: 7
Topic #: 1
Which two statements describe the advantages of using a version control system? (Choose two.)
A. It allows for branching and merging so that different tasks are worked on in isolation before they are merged into a feature or master branch.
B. It provides tooling to automate application builds and infrastructure provisioning.
C. It allows multiple engineers to work against the same code and configuration files and manage differences and conflicts.
D. It provides a system to track User Stories and allocate to backlogs.
E. It allows developers to write effective unit tests.
Selected Answer: AC
Question #: 8
Topic #: 1
What are two advantages of version control software? (Choose two.)
A. It supports tracking and comparison of changes in binary format files.
B. It allows new team members to access the current code and history.
C. It supports comparisons between revisions of source code files.
D. It provides wiki collaboration software for documentation.
E. It allows old versions of packaged applications to be hosted on the Internet.
Selected Answer: AC
Question #: 9
Topic #: 1
Before which process is code review performed when version control is used?
A. checkout of code
B. merge of code
C. committing code
D. branching code
Selected Answer: B
Question #: 10
Topic #: 1
What is an advantage of a version control system?
A. facilitates resolving conflicts when merging code
B. ensures that unit tests are written
C. prevents over-writing code or configuration files
D. forces the practice of trunk-based development
Selected Answer: A
Question #: 11
Topic #: 1
Refer to the exhibit.
Which Python data structure does my_json contain?
A. map
B. list
C. json
D. dict
Selected Answer: D
Question #: 12
Topic #: 1
When a Cisco IOS XE networking device is configured using RESTCONF, what is the default data-encoding method?
A. JSON
B. YAML
C. XML
D. x-form-encoding
Selected Answer: C
Question #: 13
Topic #: 1
Which two statements about JSON and XML are true? (Choose two.)
A. The syntax of JSON contains tags, elements, and attributes.
B. XML objects are collections of key-value pairs.
C. JSON objects are collections of key-value pairs.
D. JSON arrays are an unordered set of key-value pairs.
E. The syntax of XML contains tags, elements, and attributes.
Selected Answer: CE
Question #: 14
Topic #: 1
Which statement describes the benefit of using functions in programming?
A. Functions ensure that a developer understands the inner logic contained before using them as part of a script or application.
B. Functions create the implementation of secret and encrypted algorithms.
C. Functions allow problems to be split into simpler, smaller groups, and reduce code repetition, which makes the code easier to read.
D. Functions store mutable values within a script or application.
Selected Answer: C
Question #: 15
Topic #: 1
What is a benefit of organizing code into modules?
A. reduces the length of code
B. enables code to be multifunctional
C. enables the reuse of code
D. improves overall performance
Selected Answer: C
Question #: 16
Topic #: 1
What is a benefit of organizing code into modules?
A. enables the code to be broken down into layers
B. improves collaboration of the development team
C. makes it easier to deal with large and complex systems
D. enables the inclusion of more programming languages in the code
Selected Answer: B
Question #: 17
Topic #: 1
What is the Git command to delete a local branch named `experiment` without a warning?
A. git branch ג€”rm experiment
B. git branch ג€”n experiment
C. git branch ג€”f experiment
D. git branch ג€”D experiment
Selected Answer: D
Question #: 18
Topic #: 1
What is the outcome of executing this command?
git clone ssh:/john@example.com/path/to/my-project.git
A. creates a local copy of a repository called ג€my-projectג€
B. initiates a new Git repository called ג€my-projectג€
C. creates a copy of a branch called ג€my-projectג€
D. creates a new branch called ג€my-projectג€
Selected Answer: A
Question #: 19
Topic #: 1
Which action does the Git command git merge allow the developer to perform?
A. Combine multiple sequences of commits into one unified history
B. Push changes to the remote repository
C. Create, list, rename, and delete branches
D. Switch between branches
Selected Answer: A
Question #: 20
Topic #: 1
How does a developer create and switch to a new branch called `my-bug-fix` to develop a product fix?
A. git checkout -b my-bug-fix
B. git branch -b my-bug-fix
C. git branch my-bug-fix
D. git checkout my-bug-fix
Selected Answer: A
Question #: 21
Topic #: 1
DRAG DROP –
Drag and drop the Git commands from the left onto the right that add modified local files to a remote repository. Not all options are used.
Select and Place:
Suggestion Answer:
Question #: 22
Topic #: 1
A developer needs to prepare the file README.md in the working tree for the next commit operation using Git. Which command needs to be used to accomplish this?
A. git -a README.md
B. git add README.md
C. git add README.md staging
D. git commit README.md
Selected Answer: B
Question #: 23
Topic #: 1
A developer is reviewing a code that was written by a colleague. It runs fine, but there are many lines of code to do a seemingly simple task repeatedly. Which action organizes the code?
A. Refactor the code by removing any unnecessary tests.
B. Reverse engineer and rewrite the code logic.
C. Using functions, rewrite any pieces of code that are repeated.
D. Modify the code to use loops.
Selected Answer: C
Question #: 24
Topic #: 1
Which principle is a value from the manifesto for Agile software development?
A. processes and tools over teams and interactions
B. detailed documentation over working software
C. adhering to a plan over responding to requirements
D. customer collaboration over contract negotiation
Selected Answer: D
Question #: 25
Topic #: 1
Which advantage does the agile process offer compared to waterfall software development?
A. to add or update features with incremental delivery
B. to view the full scope of end-to-end work
C. to have each phase end before the next begins
D. to fix any issues at the end of the development cycle
Selected Answer: A
Question #: 26
Topic #: 1
How do XML and JSON compare regarding functionality?
A. XML provides more support for mapping data structures into host languages than JSON.
B. XML provides more human readability than JSON.
C. JSON provides less support for data types than XML.
D. JSON natively supports arrays and XML does not natively support arrays.
Selected Answer: D
Question #: 27
Topic #: 1
What are two principles of an infrastructure as code environment? (Choose two.)
A. Components are coupled, and definitions must be deployed for the environment to function.
B. Redeployments cause varying environment definitions.
C. Environments must be provisioned consistently using the same inputs.
D. Service overlap is encouraged to cater for unique environment needs.
E. Complete complex systems must be able to be built from reusable infrastructure definitions.
Selected Answer: CE
Question #: 28
Topic #: 1
Which two encoding formats do YANG interfaces support? (Choose two.)
A. XML
B. JSON
C. XHTML
D. BER
E. plain text
Selected Answer: AB
Question #: 29
Topic #: 1
Refer to the exhibit.
The JSON data in the exhibit has been parsed and stored into a variable `data`. What returns the value `172.16.0.11`?
A. data[‘items’][‘host’][‘value’] B. data[‘items’][1][‘host’][‘value’] C. data[‘items’][0][‘host’][‘value’] D. data[‘items’][‘host’][1]
Selected Answer: C
Question #: 30
Topic #: 1
Refer to the exhibit.
What does the Python function do?
A. It returns HTTP Basic Authentication.
B. It returns DNAC user and password.
C. It reads a token from a local JSON file and posts the token to the DNAC URL.
D. It returns an authorization token.
Selected Answer: D
Question #: 31
Topic #: 1
Package updates from a local server fail to download. However, the same updates work when a much slower external repository is used. Why are local updates failing?
A. The server is running out of disk space.
B. The Internet connection is too slow.
C. The Internet is down at the moment, which causes the local server to not be able to respond.
D. The update utility is trying to use a proxy to access the internal resource.
Selected Answer: D
Question #: 32
Topic #: 1
What is a functionality of the Waterfall method as compared to the Agile method for software development?
A. Waterfall increases agility to implement faster while Agile promotes reliability.
B. A phase begins after the previous phase has ended in Waterfall while Agile phases run in parallel.
C. Customers get feedback during the process in Waterfall while they can see the result at the end in Agile.
D. Requirements can be updated in Waterfall while in Agile it should be gathered in the beginning.
Selected Answer: B
Question #: 33
Topic #: 1
What is a benefit of using functions in the code for the development process?
A. better user experience in the end product
B. improves code performance
C. easier to compile the code
D. faster code development
Selected Answer: D
Question #: 34
Topic #: 1
What is the difference between YAML and JSON data structure?
A. YAML uses spaces; JSON uses parentheses
B. YAML uses indentation; JSON uses brackets and braces
C. YAML uses brackets and braces; JSON uses indentation
D. YAML uses parentheses; JSON uses spaces
Selected Answer: B
Question #: 35
Topic #: 1
A developer is working on a feature for a new application. The changes in the existing branch named ‘feat00304’ must be integrated into a single commit with the current working primary branch named ‘prodapp411926287’. Which git command must be used?
A. git rebase –merge feat00304
B. git merge –squash feat00304
C. git push –rebase feat00304
D. git checkout –squash feat00304
Selected Answer: B
Question #: 36
Topic #: 1
A file that already exists in a local repository is updated. Which command must be executed to ensure that the changes in the file are included in the next Git commit?
A. git update
B. git merge
C. git add
D. git rebase
Selected Answer: C
Question #: 37
Topic #: 1
Into which type of Python data structure should common data formats be parsed?
A. sequence
B. set
C. dictionary
D. list
Selected Answer: C
Question #: 38
Topic #: 1
Several teams at a company are developing a new CRM solution to track customer interactions with a goal of improving customer satisfaction and driving higher revenue. The proposed solution contains these components:
* MySQL database that stores data about customers
* HTML5 and JavaScript UI that runs on Apache
* REST API written in Python
What are two advantages of applying the MVC design pattern to the development of the solution? (Choose two.)
A. to enable multiple views of the same data to be presented to different groups of users
B. to provide separation between the view and the model by ensuring that all logic is separated out into the controller
C. to ensure data consistency, which requires that changes to the view are also made to the model
D. to ensure that only one instance of the data model can be created
E. to provide only a single view of the data to ensure consistency
Selected Answer: AB
Question #: 39
Topic #: 1
What is a benefit of version control?
A. prevents two users from working on the same file
B. keeps track of all changes to the files
C. prevents the sharing of files
D. keeps the list of data types used in the files
Selected Answer: B
Question #: 40
Topic #: 1
Refer to the exhibit. What does the command marked (2) do when it is run?
A. It duplicates the ג€testג€ branch.
B. It deletes the ג€testג€ branch only if a new branch is created.
C. It deletes the ג€testג€ branch.
D. It does not delete the branch until it is merged.
Selected Answer: C
Question #: 41
Topic #: 1
What is a comparison of YAML and JSON?
A. YAML has a more consistent approach to representing data compared to JSON.
B. JSON does not support comments and YAML does.
C. YAML is a more verbose data structure compared to JSON.
D. JSON has more common usage in configuration management tools compared to YAML.
Selected Answer: B
Question #: 42
Topic #: 1
Which status code is used by a REST API to indicate that the submitted payload is incorrect?
A. 400
B. 403
C. 405
D. 429
Selected Answer: A
Question #: 43
Topic #: 1
DRAG DROP –
Refer to the exhibits.
Drag and drop the code from the left onto the item numbers on the right to complete the Meraki Python script shown in the exhibit.
Select and Place:
Suggestion Answer:
Question #: 44
Topic #: 1
An application calls a REST API and expects a result set of more than 550 records, but each time the call is made, only 25 are returned. Which feature limits the amount of data that is returned by the API?
A. pagination
B. payload limit
C. service timeouts
D. rate limiting
Selected Answer: A
Question #: 45
Topic #: 1
A developer is writing an application that uses a REST API and the application requires a valid response from the API. Which element of the response is used in the conditional check?
A. body
B. headers
C. link
D. URL
E. status code
Selected Answer: E
Question #: 46
Topic #: 1
Refer to the exhibit.
A REST API returns this JSON output for a GET HTTP request, which has been assigned to a variable called `vegetables`. Using Python, which output is the result of this command? print(filter(lambda 1: 1[‘type’] == ‘fruit’, vegetables) [0][‘items’][0][‘items’][0])
A. {‘color’: ‘green’, ‘items’: [‘kiwi’, ‘grape’]}
B. [‘kiwi’, ‘grape’]
C. lettuce
D. kiwi
Selected Answer: D
Question #: 47
Topic #: 1
DRAG DROP –
Drag and drop the Python code from the left onto the correct step on the right to call a REST API.
Select and Place:
Suggestion Answer:
Question #: 48
Topic #: 1
A 401 HTTP response code is returned when calling a REST API. What is the error state identified by this response code?
A. The server cannot process the request as it has detected an issue in the request syntax or body.
B. The request has not been accepted because it requires authentication.
C. The sever accepted the request but the client is not authorized for this content.
D. The server cannot find the requested resource because the path specified is incorrect.
Selected Answer: B
Question #: 49
Topic #: 1
A developer needs a list of clients connected to a specific device in a Meraki network. After making a REST API call, the developer receives an unfamiliar response code. Which Cisco DevNet resource should be used to identify the meaning of the response code?
A. API documentation
B. Code Exchange
C. Learning Labs
D. Sandbox
Selected Answer: A
Question #: 50
Topic #: 1
A developer is trying to retrieve data over a REST API. The API server responds with an HTTP client error response code. After investigating the response, the developer realizes the response has a Retry-After header. What is the root cause of this error?
A. An appliance limited the rate of requests to the transport layer.
B. The REST service is unreachable at the time of the REST request.
C. Too many requests were sent to the REST service in a given amount of time.
D. An appliance limited the rate of requests to the application layer.
Selected Answer: C
Question #: 51
Topic #: 1
Refer to the exhibit.
A developer needs to upload a local file by using the REST API. The developer gathers information according to the documentation and sends the request by using the cURL command in the exhibit but gets an error code. Which action should be followed to get a valid response?
A. change content-type as JSON
B. add the authorization header with the access token
C. and a username-password combination to request command
D. change request method as GET
Selected Answer: B
Question #: 52
Topic #: 1
DRAG DROP –
Refer to the exhibit.
Drag and drop the descriptors from the left onto the corresponding parts of the API request and response on the right.
Select and Place:
Suggestion Answer:
Question #: 53
Topic #: 1
Which action resolves a 401 error in response to an HTTP GET that is issued to retrieve a configuration statement using RESTCONF on a CSR 1000V?
A. Change the HTTP method to PUT.
B. Check the MIME types in the HTTP headers.
C. Change the transport protocol to HTTPS.
D. Check the authentication credentials.
Selected Answer: D
Question #: 54
Topic #: 1
Refer to the exhibit.
An API call is constructed to retrieve the inventory in XML format by using the API. The response to the call is 401 Unauthorized. Which two headers must be added to the API call? (Choose two.)
A. Bearer-Token: dXNlcm5hbWU6cGFzc3dvcmQ=
B. Content-Type: application/xml
C. Authentication: Bearer dXNlcm5hbWU6cGFzc3dvcmQ=
D. Accept: application/xml
E. Authorization: Bearer dXNlcm5hbWU6cGFzc3dvcmQ=
Selected Answer: DE
Question #: 55
Topic #: 1
Which HTTP response status code means `Forbidden`?
A. 500
B. 401
C. 403
D. 502
Selected Answer: C
Question #: 56
Topic #: 1
Which HTTP response code should be returned when the request is completed, but there is no content to send for the request?
A. 100
B. 204
C. 302
D. 402
Selected Answer: B
Question #: 57
Topic #: 1
Refer to the exhibit. Which data is specified in the response header?
A. Content-Type
B. HTTP/1.1 200 OK
C. ג€typeג€: ג€switchג€
D. { ג€idג€: ג€a123456bcdeג€, HTTP/1.1 200 OK ג€statusג€: ג€onlineג€, ג€typeג€: ג€switchג€ }
Selected Answer: A
Question #: 58
Topic #: 1
What are two use cases where webhooks are effective? (Choose two.)
A. Filter out information from a response to an API call.
B. Close a session with a web server after a specific amount of time.
C. Inform a previously defined chat channel after a deployment fails.
D. Send an email to a customer of an online store after payment is complete.
E. Change the response format or content type of an API call.
Selected Answer: CD
Question #: 59
Topic #: 1
In which two ways is an application characterized when interacting with a webhook? (Choose two.)
A. receiver
B. transaction monitor
C. codec
D. processor
E. listener
Selected Answer: AE
Question #: 60
Topic #: 1
How does requesting a synchronous API operation differ from requesting an asynchronous API operation?
A. clients receive responses with a task ID for further processing
B. clients subscribe to a webhook for operation results
C. clients poll for the status of the execution of operations
D. clients can access the results immediately
Selected Answer: D