Cognizant Interview Question

They given two programs to explain on decorator and functions