Natural numbers between 1 and 1000, so numbers are in sorted order. So we can apply Binary Search Algorithm to it.
Ref: https://www.geeksforgeeks.org/binary-search/
Time Complexity of the algorithm = $\Theta$($log_{2}$n ), n = Number of elements and $\Theta$($log_{2}$n ) = Number of times we performs comparison.
Here n = 1000 = ${2^{10}}$(Approx).
So the number of comparison in worst case = $\Theta$($log_{2}$${2^{10}}$ ) = 10 . (You can use big-oh notation also).
Explanation: Every time Asha will ask to Lata →
1)Is the number equals to mid? If yes then done.
else
2)Is the number greater than mid? If yes then we will check for greater elements and also mid will be changed.
else
3) We will check for smaller elements and also mid will be changed.
Actually he is doing nothing but binary search. Here mid is nothing but middle element of our current search area in those 1000 elements.Please check the algorithm it will be more clear.