bimgrafX interview question

Write Code in Python and C?