I did read in one tutorial, it said one needs, at least trigonometry, to get any where with programming code.
That may ot neccesarily be true, but the math is helpful.
I rewrote your code to this
SCREEN 12
WIDTH 40
CLS
DO
PRINT "Press the LETTER please"
z = INT(RND * 26) + 66
PRINT CHR$(z)
'-------------------------------------------
WHILE Letter$ <> CHR$(z)
INPUT "Letter: ", Letter$ 'somewhere in here, I want it to print message if the letter is not correct
Letter$ = UCASE$(Letter$)
IF Letter$ = CHR$(z) THEN
PRINT " Good You wrote "; Letter$
ELSE
PRINT "Wrong ,you wrote "; Letter$; " Please Try again "; CHR$(z)
END IF
WEND
_DELAY 1
CLS
LOOP UNTIL _KEYDOWN(27)
SLEEP
SYSTEM