Write The Python Program To Implement A Algorithm