GSK Interview Question

Use python coding to solve a question