exam questions

Exam 350-901 All Questions

View all questions & answers for the 350-901 exam

Exam 350-901 topic 1 question 304 discussion

Actual exam question from Cisco's 350-901
Question #: 304
Topic #: 1
[All 350-901 Questions]

DRAG DROP
-

Drag and drop the code from the bottom onto the box where the code is missing in the Python script to display the error message to the user. The script uses Python to connect to Cisco DNA Center and provides details if the connection fails. Not all options are used.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SzClar
Highly Voted 1 year, 9 months ago
1. requests.codes["ok"] - in the provided answers there is typo {requests.code.ok} - this is not valid Python code 2. rc.status_code 3. rc.reason
upvoted 9 times
Ch33s3y
10 months ago
They both work: >>> import requests >>> requests.codes.ok 200 >>> requests.codes['ok'] 200
upvoted 3 times
...
...
IzzyS
Most Recent 1 year, 8 months ago
sess = requests.session() rc = sess.request('GET', dnac_url, timeout=1) if rc.status_code == request_code['ok']: print("good") else: print(rc.status_code) print(rc.reason)
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago