DevNet Associate (DEVASC): 200-901 Questions

200-901 FAQs

Question #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.

Correct Answer: BE

Question #2  

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

Correct Answer: C

Reference:

https://www.guru99.com/test-driven-development.html

Question #3  

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.

Correct Answer: B

Reference:

Question #4  

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

Correct Answer: CE

Reference:

https://www.cs.uic.edu/~i442/Patterns%20for%20TDD.pdf

Question #5  

In the test-driven development model, what is changed after a test fails?

A. schedule

B. project requirements

C. code

D. test

Correct Answer: C

Reference:

https://www.guru99.com/test-driven-development.html#:~:text=In%20simple%20terms%2C%20test%20cases,code%20simple%20and%20bug% 2Dfree

Question #6  

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

Correct Answer: D

Question #7  

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.

Correct Answer: AC

Question #8  

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.

Correct Answer: BC

Question #9  

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

Correct Answer: B

Question #10  

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

Correct Answer: A

Question #11  

Refer to the exhibit.

Which Python data structure does my_json contain?

A. map

B. list

C. json

D. dict

Correct Answer: D

Reference:

https://stackoverflow.com/questions/34764979/loading-python-string-with-u-as-json?noredirect=1&lq=1

Question #12  

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

Correct Answer: C

Reference:

https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/restapi/restapi/RESTAPIintro.pdf

Question #13  

Refer to the exhibit.

Which JSON is equivalent to the XML-encoded data?

Correct Answer: B

Reference:

https://www.guru99.com/json-vs-xml-difference.html

Question #14  

FILL BLANK –

Fill in the blanks to complete the Python script to request a service ticket using the APIC-EM REST API for the user `devnetuser`. import requests

import json controller = ‘devnetapi.cisco.com/sandbox/apic_em’ url = `https://` + controller + `api/va/ticket` payload = {‘username’:

‘_________________’, ‘password’: ‘370940885’} header = {‘Content-type’: ‘application.json’} response = _______________________.post(url,

data=json.dumps(payload), \ headers= ______________________, verify=False) r_json = response.json() print(r_json) ticket = r_json[`response`]

[`serviceTicket`] print(ticket)

Correct Answer: See explanation below.

devnetuser

requests

header

Reference:

https://developer.cisco.com/docs/apic-em/#!hello-world

Question #15  

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.

Correct Answer: CE

Question #16  

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.

Correct Answer: C

Question #17  

Refer to the exhibit.

The output of a unified diff when comparing two versions of a Python script is shown. Which two `single_request_timeout()` functions are defined in fish.py and cat.py? (Choose two.)

A.

B.

C.

D.

E.

Correct Answer: BC

Question #18  

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

Correct Answer: C

Question #19  

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

Correct Answer: B

Question #20  

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

Correct Answer: D

Reference:

https://www.atlassian.com/git/tutorials/using-branches

Question #21  

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 €ג

Correct Answer: A

Reference:

https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-clone

Question #22  

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

Correct Answer: A

Reference:

https://www.atlassian.com/git/tutorials/using-branches/git-merge

Question #23  

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

Correct Answer: A

Question #24  

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:

Question #25  

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

Correct Answer: B

Reference:

https://teamtreehouse.com/community/committing-the-readmemd-file-to-repository

Question #26  

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.

Correct Answer: C

Question #27  

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

Correct Answer: D

Reference:

https://www.cisco.com/c/dam/global/en_hk/solutions/collaboration/files/agile_product_development.pdf

Question #28  

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

Correct Answer: A

Question #29  

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.

Correct Answer: B

Question #30  

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.

Correct Answer: CE

Question #31  

Which two encoding formats do YANG interfaces support? (Choose two.)

A. XML

B. JSON

C. XHTML

D. BER

E. plain text

Correct Answer: AB

Reference:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/prog/configuration/171/b_171_programmability_cg/model_driven_telemetry.html

Question #32  

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]

Correct Answer: C

Question #33  

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.

Correct Answer: D

Reference:

https://community.cisco.com/t5/cisco-digital-network/how-can-i-make-this-script-to-run/td-p/3882782

Question #34  

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.

Correct Answer: D

Question #35  

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.

Correct Answer: B

Question #36  

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

Correct Answer: D

Question #37  

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

Correct Answer: B

Question #38  

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

Correct Answer: B

Question #39  

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

Correct Answer: C

Question #40  

Into which type of Python data structure should common data formats be parsed?

A. sequence

B. set

C. dictionary

D. list

Correct Answer: C

Question #41  

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

Correct Answer: AB

Question #42  

Refer to the exhibit. Which XML snippet has interface information that conforms to the YANG model?

A.

B.

C.

D.

Correct Answer: A

Question #43  

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

Correct Answer: B

Question #44  

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.

Correct Answer: C

Question #45  

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.

Correct Answer: B

Reference:

https://stackoverflow.com/questions/244777/can-comments-be-used-in-json

Question #46  

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

Correct Answer: A

Reference:

https://community.cisco.com/t5/application-centric/apic-rest-api-produces-inconsistent-response/td-p/2758230

Question #47  

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:

Question #48  

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

Correct Answer: A

Question #49  

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

Correct Answer: E

Question #50  

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

Correct Answer: D

Pages: 1 2


Tags: