Here is a hint: the value for 5 is 25. The next question is: what is the value for 6?
6 thoughts on “Quiz (2): hint”
Leave a Comment
You must be logged in to post a comment.
Bertrand Meyer's technology+ blog
Software engineering, programming methodology, languages, verification, general technology, publication culture, and more
You must be logged in to post a comment.
Undefined until you tell us
In theory the next number can be anything, without having a clearly defined function it’s impossible to precisely predict which number could come up in series.
For the less theoretical approach the value for 6 would be 36, which could the imply the function f: x -> x^2
Now, am I too bold to guess a 36?
OK, I’ll bite…
The function is only defined for the domain values for which you have specified a result. Outside this domain, the result is undefined – strictly a precondition failure, as this is a partial function.
Am I warm? :-)
You can guess anything. My guess is square root of -3. It’s as valid as your guess, since the true answer is whatever function professor Meyer has in mind.
I guess since the question is what is the value for 6, then we can rule out a precondition violation.
my guess is that the function is y = x * x % 4294967296