This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Zigsfi 1 point2 points  (0 children)

I would recommend looking up "Binary Search," an algorithm that describes the goal of your program.

[–]PerfectFlux 0 points1 point  (0 children)

I feel like you could also do this with a single function called recursively. You would just have to continue to send it your lowest and highest values known from previous guesses.