JPMorganChase Interview Question

Probability question, python, easy coding