Apple interview question

Oop question in python and make the function.