Cognizant interview question

Basic and oops concepts in python.