Free 200-901 Exam Braindumps (page: 5)

Page 4 of 132

Refer to the exhibit.

Which JSON is equivalent to the XML-encoded data?





Answer(s): C


Reference:

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



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)

  1. See Explanation section for answer.

Answer(s): A

Explanation:

devnetuser requests header


Reference:

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



Which two statements about JSON and XML are true? (Choose two.)

  1. The syntax of JSON contains tags, elements, and attributes.
  2. XML objects are collections of key-value pairs.
  3. JSON objects are collections of key-value pairs.
  4. JSON arrays are an unordered set of key-value pairs.
  5. The syntax of XML contains tags, elements, and attributes.

Answer(s): C,E



Which statement describes the benefit of using functions in programming?

  1. Functions ensure that a developer understands the inner logic contained before using them as part of a script or application.
  2. Functions create the implementation of secret and encrypted algorithms.
  3. Functions allow problems to be split into simpler, smaller groups, and reduce code repetition, which makes the code easier to read.
  4. Functions store mutable values within a script or application.

Answer(s): C






Post your Comments and Discuss Cisco® 200-901 exam with other Community members:

200-901 Discussions & Posts