J.P. Morgan Interview Question

some integral questions and coding test in python