Generates random number and compares user guess