Honeywell Interview Question

Basic function definition problems in language of choice