Hey guys,
I'm having trouble with question 5 from the first quiz. I thought 'guess and check' was covered in lecture 5 in relation to calculating square roots so I tried this speculatively (it'll only work with ints so I kind of knew it was wrong):
1. calculate a max poss value for the answer
2. calculate a min poss value for the answer
3. set guess = minimum
4. while guess<= maximum
if guess = answer +/- epsilon
return guess
increment guess
Obviously this is absolutely nothing like the real answer which I can't make any sense of .... any help much appreciated ...

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.