Ubisoft interview question

Code a function in Python and then in C++