Question: Lets have a rand5 function, that returns values from 0 to 4. Each value is given with probability 1 in 5. Use this function to define rand7, that returns values 0 to 6 (each value is given with probability 1 in 7).

While upgrading mine W8 to W8.1, I have encountered an installation error. The download in Windows Store got stuck on 50% with an error 0x80070002. Google didn’t show up any relevant results (well, it was the first day after W8.1 release). Going through the logs c:\$Windows.~BT\ was more or less...