Pregunta de entrevista de Qualcomm

Basic programs in python and maths question