Question d’entretien chez Zynga

Write program that takes string and returns a digit.