Now we have been assigned to make it recognise which service is running on each port that is listening
I don't believe your task is computationally feasible, unless you are allowed to lookup /etc/services.
I believe that each port will send a response header when it an application tries to connect to it
No. Telnet and HTTP for example send nothing until a request is received.
I am sorry this is such a broad question
It's not your fault, it's the fault of the assignment, unless you have misunderstood it or misquoted it here.