Pergunta de entrevista da empresa Tagit Pte

Write a function which accepts amount and updates the available balance based on the deposit or withdrawal?