Cisco® 200-901 Exam Practice Questions (P. 2)
- Full Access (632 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #11
Refer to the exhibit.

Which Python data structure does my_json contain?

Which Python data structure does my_json contain?
- Amap
- Blist
- Cjson
- DdictMost Voted
Correct Answer:
D
Reference:
https://stackoverflow.com/questions/34764979/loading-python-string-with-u-as-json?noredirect=1&lq=1
D
Reference:
https://stackoverflow.com/questions/34764979/loading-python-string-with-u-as-json?noredirect=1&lq=1
send
light_mode
delete
Question #12
When a Cisco IOS XE networking device is configured using RESTCONF, what is the default data-encoding method?
- AJSON
- BYAML
- CXMLMost Voted
- Dx-form-encoding
Correct Answer:
A
Reference:
https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/restapi/restapi/RESTAPIintro.pdf
A
Reference:
https://www.cisco.com/c/en/us/td/docs/routers/csr1000/software/restapi/restapi/RESTAPIintro.pdf
send
light_mode
delete
Question #13
Refer to the exhibit.

Which JSON is equivalent to the XML-encoded data?
A.

B.

C.

D.


Which JSON is equivalent to the XML-encoded data?
A.

B.

C.

D.

send
light_mode
delete
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)
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
See explanation below.
devnetuser
requests
header
Reference:
https://developer.cisco.com/docs/apic-em/#!hello-world

The provided script successfully interacts with the APIC-EM REST API to request service tickets. The correct username 'devnetuser' should be included in the 'payload' dictionary. The 'response' variable is set up to use Python's `requests` library to make a POST request. Use the defined 'header', which should note 'Content-type' as 'application/json', to correctly specify the content type in the API request header. Additionally, ignoring SSL verification with 'verify=False' is appropriate when working within a controlled sandbox environment. This approach aligns accurately with the APIC-EM API's expectations for authenticating and retrieving service tickets.
send
light_mode
delete
Question #15
Which two statements about JSON and XML are true? (Choose two.)
- AThe syntax of JSON contains tags, elements, and attributes.
- BXML objects are collections of key-value pairs.
- CJSON objects are collections of key-value pairs.Most Voted
- DJSON arrays are an unordered set of key-value pairs.
- EThe syntax of XML contains tags, elements, and attributes.Most Voted
Correct Answer:
CE
CE

JSON objects are defined by their use of key-value pairs, making it straightforward to represent data in a clean, readable format. On the other hand, XML employs a structured layout using tags, elements, and attributes, which is beneficial when document validation and metadata are crucial. Both formats serve different purposes in data serialization, and understanding these fundamental differences can aid in effectively choosing the appropriate format in various programming contexts.
send
light_mode
delete
Question #16
Which statement describes the benefit of using functions in programming?
- AFunctions ensure that a developer understands the inner logic contained before using them as part of a script or application.
- BFunctions create the implementation of secret and encrypted algorithms.
- CFunctions allow problems to be split into simpler, smaller groups, and reduce code repetition, which makes the code easier to read.Most Voted
- DFunctions store mutable values within a script or application.
Correct Answer:
C
C

Absolutely! Using functions in programming is truly a game-changer. By breaking down problems into manageable sections and minimizing repeated code, functions definitely streamline the process. This not only makes your code more readable (imagine trying to find a bug in a spaghetti code!) but it also increases the maintainability. Functions being like the summary of a book, provide a clear, modular approach to tackle complex coding challenges, making your life as a developer a whole lot easier.
send
light_mode
delete
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.


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.

send
light_mode
delete
Question #18
What is a benefit of organizing code into modules?
- Areduces the length of code
- Benables code to be multifunctional
- Cenables the reuse of codeMost Voted
- Dimproves overall performance
Correct Answer:
C
C

Sure thing, C definitely nails it. Modules really shine when it comes to breaking down complex code into manageable, isolated pieces that you can use again in different parts of your project or even in entirely new projects. When you've got a solid module, you're not just saving yourself some time today, you're also setting up a reusable tool that can make coding quicker and less prone to bugs down the line. Plus, they keep things clean and easy to understand, which is always a bonus when you're going back through code or collaborating with others.
send
light_mode
delete
Question #19
What is a benefit of organizing code into modules?
- Aenables the code to be broken down into layers
- Bimproves collaboration of the development teamMost Voted
- Cmakes it easier to deal with large and complex systems
- Denables the inclusion of more programming languages in the code
Correct Answer:
C
C

Regarding Option C, organizing code into modules primarily enhances the manageability of large and complex systems by facilitating their decomposition into more digestible, maintainable parts. This modular approach allows developers to break down extensive software architecture into smaller, functional segments, significantly simplifying both development and troubleshooting processes. By focusing on individual modules, a developer can achieve better control and clarity over the systemic functionalities, promoting efficient and scalable code management. This modular structure is an indispensable principle, especially critical when addressing the complexities inherent in large-scale system development.
send
light_mode
delete
Question #20
What is the Git command to delete a local branch named `experiment` without a warning?
- Agit branch ג€"rm experiment
- Bgit branch ג€"n experiment
- Cgit branch ג€"f experiment
- Dgit branch ג€"D experimentMost Voted
Correct Answer:
D
Reference:
https://www.atlassian.com/git/tutorials/using-branches
D
Reference:
https://www.atlassian.com/git/tutorials/using-branches
send
light_mode
delete
All Pages