Your Task Your task is to implement a version of the guess-the-number function l
ID: 3926341 • Letter: Y
Question
Your Task Your task is to implement a version of the guess-the-number function like you have on other occasions, except this one: Is played on an n-dimensional board. You must meet strict complexity requirements. Your function must have the following signature. function y = play(a, b, f) Where: a is row vector of length n for n > 0. b is row vector with length(a) == length(b). f is the oracle. The unknown point has integer coordinates and is in the rectangle with lower-left corner a and upper-right corner b. HINT:Just like the previous versions of this game, you will need to have a loop body or a recursion. In the 2D version of the game, you may have handled the two dimensions in two separate cases. But because the dimension is now arbitrary, you'll need a loop-within-loop structure Your Task Your task is to implement a version of the guess-the-number function like you have on other occasions, except this one: Is played on an n-dimensional board. You must meet strict complexity requirements. Your function must have the following signature. function y = play(a, b, f) Where: a is row vector of length n for n > 0. b is row vector with length(a) == length(b). f is the oracle. The unknown point has integer coordinates and is in the rectangle with lower-left corner a and upper-right corner b. HINT:
Just like the previous versions of this game, you will need to have a loop body or a recursion. In the 2D version of the game, you may have handled the two dimensions in two separate cases. But because the dimension is now arbitrary, you'll need a loop-within-loop structure Your Task Your task is to implement a version of the guess-the-number function like you have on other occasions, except this one: Is played on an n-dimensional board. You must meet strict complexity requirements. Your function must have the following signature. function y = play(a, b, f) Where: a is row vector of length n for n > 0. b is row vector with length(a) == length(b). f is the oracle. The unknown point has integer coordinates and is in the rectangle with lower-left corner a and upper-right corner b. HINT:
Just like the previous versions of this game, you will need to have a loop body or a recursion. In the 2D version of the game, you may have handled the two dimensions in two separate cases. But because the dimension is now arbitrary, you'll need a loop-within-loop structure
Explanation / Answer
guessthegame.py
import math
frame.start()
guessthegame.py
import math
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.