Both those statements are wrong.
int getHourOfDay(var input) {
return Random.GetInteger();
}
That will both be wrong 90% of the time and will continually give different (random) outputs. Before you quibble it's a trivial example to prove the point (and lets not get into seed values), there are an infinite class of algorithms that fit this.
I don't know much about code, but isn't that because you have it set to a random value, so if that's the case, yes. You will get a RANDOM VALUE, every time because it's set as arbitrary. One can say that it is very unlikely that one will get the exact same value every time from that code, making my statement consistent because you inputted a code to something random, and random is what you get. Every time you open a folder or file on windows, IT WILL BE THAT FILE OR FOLDER. Unless you have a folder that is randomized, then you will have a folder that opens a RANDOM FOLDER.
So still the code is doing its exact job, the code you have inputted is still doing its main output goal, while the numeric value will not be consistent because you have set it as so, the code itself is doing its job and not doing something completely different.
I think what I have said is true unless I misinterpreted the code, then i am totally wrong.