exercise on Profit and loss