Solved Please Write A Python Code To Solve The Following

Solved Please Write A Python Code To Solve The Following