digitPreference function

Digit preference test