Lloyds Banking Group Interview Question

They asked me two coding questions in Online assessment.