Intel Corporation interview question

define a function in python language