The problem is that you’re letting yourself get hungry. Instead of focusing on ‘not eating’ focus on not eating junk. If you’re allowed to eat in class, snack on fruit after lunch before you get home so you don’t want to eat the entire fridge. If you can’t eat in class, bring carrots or something that can go without being chilled and eat it on the way home so you’re already full. Then focus on your homework and have a healthy snack by your side. If you’re constantly full, you won’t want to fill up on bad food.