Question about Functions skill test 3

Is functions test 3 really a better way to right the code in test 1? or is it simply a more complex way to right it? ie does chooseName() function the same either way?