Getting return value From Function with loop

THANK YOU Tried that using score(“apple”) but still no result comes out