I live in Australia so I'm not exactly sure how old you are but if you have a locker you should have them all and alternate them during different classes.
The most you can prpobably hide in a pencil case etc. is two or three, so you have either five or four in a locker. Before your next class make sure they're all well fed and everything (I'm going to call the tamgotchi's numbers 1-7 so it is easier to understand, for the example I'm going to pretend you have two in a pencil case).
What to do:
Tamagotchi 3-7 are safely in a locker with the sound off with full hunger and happiness.
Tamagotchi 1 & 2 and in a pencil case with their sound off with full hunger and happiness.
Every so often pretend that you are getting a pencil out of your pencil case and feed them (if they are unhappy do not play games with them, feed them snacks - you can work off the weight some other time).
Before next class quickly feed every tama so they have full health and hunger and take the next two tamagotchi's (3 and 4) out and put them in your pencil case with their sound off with full hunger and happiness.
Every so often pretend that you are getting a pencil out of your pencil case and feed them (if they are unhappy do not play games with them, feed them snacks - you can work off the weight some other time).
And keep repeating, alternating tamagotchi's through out the day. You should be able to fill hunger and happiness at the start and end of recess/lunch which should keep them happy.
Do not:
worry about checking on them every single second (they can easily lose one or two hearts isn't much and can easily be cured. it will not get them sick, they do not need to be checked every five minutes)
tell anybody (nobody at all should know, people have big mouths)
keep them on one lanyard/key chain (keep them separate, they are easier to keep hidden that way)
bring a baby tamagotchi to school (they are high maintenance and call on you very often, you will NEED to put this tamagotchi on pause, it doesnt matter if it is one or two hours late in growing up)
Play games with a tamagotchi during class (jerking hand movements are easy give aways.)
This should help you a bit,
~ shishi