EY interview question

Write a program in C++ and Python?