Classroom noise traffic light

Can you provide a wiring diagram and a little more about the components that you are using? Also, your code should be in code tags. You can easily edit the original post to fix that.