Cisco
200-901 · Question #548
Refer to the exhibit. A developer created a Python script by using the Cisco Meraki API. The solution must: - Obtain a list of HTTP servers for a network named "net1". - Print the response body if the
Sign in or unlock 200-901 to reveal the answer and full explanation for question #548. The question stem and answer options stay visible for context.
Understanding and Using APIs
Question
Refer to the exhibit. A developer created a Python script by using the Cisco Meraki API. The solution must:
- Obtain a list of HTTP servers for a network named "net1".
- Print the response body if the HTTP status code is 200.
- Handle the timeout requests as exceptions, and print Timeout Error
next to the exception to stdout. Which block of code completes the script? A. B. C. D.
Exhibit
Options
- Aexcept requests.Timeout as e: print("Timeout Error: {}". Format(e)) if response.status_code ==200: print(response.text)
- Bexcept Timeout as exception: print("Timeout Error") if status_code == 200: print(response.text)
- Cexcept requests Timeout: print("Timeout Error") if response.status_code == 200: print(response)
- Dexcept requests.Timeout as exception: print("Timeout Error: exception") if response.status_code == 200: print(response)
Unlock 200-901 to see the answer
You've previewed enough free 200-901 questions. Unlock 200-901 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Python programming#Cisco Meraki API#API error handling#REST API interaction
