Honeywell interview question

Basic function definition problems in language of choice