I am trying to create an app where the user has to memorize a `random number` (17 digits long) and then enter what she/he remembers. 

After generating the number, *how do I check how similar they are i.e. 10 of the digits match so it is 58% similar*.