Honestly, a simple "I'm sorry" is totally fine. The best thing you can actually do in this scenario is just start doing your homework! Your teacher is getting irritated because they want to see you succeed, so make it up to them by succeeding in the future!