Qualcomm Interview Question

Basic programs in python and maths question