exam questions

Exam AI-102 All Questions

View all questions & answers for the AI-102 exam

Exam AI-102 topic 2 question 39 discussion

Actual exam question from Microsoft's AI-102
Question #: 39
Topic #: 2
[All AI-102 Questions]

You are developing a method that uses the Azure AI Vision client library. The method will perform optical character recognition (OCR) in images. The method has the following code.



During testing, you discover that the call to the get_read_result method occurs before the read operation is complete.

You need to prevent the get_read_result method from proceeding until the read operation is complete.

Which two actions should you perform? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

  • A. Remove the operation_id parameter.
  • B. Add code to verify the read_results.status value.
  • C. Add code to verify the status of the read_operation_location value.
  • D. Wrap the call to get_read_result within a loop that contains a delay.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

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
anto69
Highly Voted 6 months, 3 weeks ago
Selected Answer: BD
B - D, repeated many times with both python an C#
upvoted 5 times
...
TsuenKit
Most Recent 1 month, 1 week ago
Selected Answer: BD
The answer is B and D. Explanation -B. Add code to verify the read_results.status value. We need to check this status to ensure that the operation is complete before retrieving the results. Adding code to check the read_results.status value provides the status of the OCR operation (e.g., "notStarted", "running", or "succeeded"), so we avoid to access results before they are available. D. Wrap the call to get_read_result within a loop that contains a delay. The OCR process in Azure AI Vision is asynchronous, so wrapping the call to get_read_result in a loop with a delay allows you to continuously check whether the operation is complete.
upvoted 1 times
...
mrg998
5 months, 3 weeks ago
B & D for sure
upvoted 1 times
...
moonlightc
7 months ago
Selected Answer: BD
B and D
upvoted 2 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