Q:

I'm making a makefile that exits if there isn't a proper exit status from the python code

cmd=python sol.py
A:
        @$(cmd)
.PHONY: disp
disp:
        python sol.py
        EXIT_STAtus=$$? \
        ifeq ($EXIT_STAtus,1) \
                @echo "GG"; \
                exit 1; \
        else \
                @echo "ALL GOOD"; \
        endif

I have made a makefile of such kind, the if loop and the exit all works fine, but the echoing is not happening in either parts.
Can you please tell why?

A:

You are confused and misunderstand make so spend several hours reading the documentation of GNU make, and also the documentation of your Unix shell, probably GNU bash. Please understand what happens at make time and what happens inside make recipes (the actions are interpreted by your shell, not by make; that shell is run by  make).
ifeq is a rarely useful conditional make construct, acting at "parsing" time (when the make program is reading your Makefile). It is somehow analog to #if in C code, in the sense that it asks make to skip some input. You should not use ifeq in your case, or when you want to change behavior at run time (of make).
You probably need a conditional shell command. Read about conditional shell constructs in bash (they use if, a shell keyword). Read also documentation of test(1), often abbreviated as [ in shell commands, and notice that it is also a bash builtin. 
As triplee comments, you don't even need any conditional shell command in your case. I think that error messages should be output by your Python script, and they should be relevant (so you'll better improve your sol.py  script instead).
In your Makefile, it should be a single command, because different shell commands in your Makefile don't communicate and are run independently by make. Read the using one shell section of make documentation.
I am guessing that you might want to
disp:
        python sol.py; \
        EXIT_STAtus=$$? ; \
        if [ "$$EXIT_STAtus" -eq 1 ]; then \
                echo "GG"; \
                exit 1; \
        else \
                echo "ALL GOOD"; \
        endif

Notice that you execute a single shell command (from python to endif above), so you need backslashes at end of every line except the last.
You might want to run make --trace (and/or make -n) or even remake with -x to understand what is happening and to debug your Makefile.
You definitely should spend more time in reading the documentation.
BTW, why don't you change instead your sol.py Python script to output GG or ALL GOOD? It might be a simpler solution, and I actually recommend doing that and have a bettersol.py Python script. Then your Makefile rule should be much simpler:
disp:
        python bettersol.py

Also, when debugging a Makefile, you should first remove all @ to understand what is happening.
As a rule of thumb, avoid using @ in Makefiles. In general, make should run verbosely. As a beginner, you should never use @. Later you might sometimes add @ in very few rules (but I don't recommend doing that).
NB: Your first make rule for A: is also very bad (or at least ugly and smells bad). You probably should at least remove the @, and if A is an output of sol.py you'll better improve sol.py to make that explicit, perhaps having python sol.py > $@ in your first recipe.

