Those are great harmonic ear training exercises.
A good melodic ear training exercise is to practice tendency tones. An awareness of tendency tones is an excellent way to achieve relative pitch (the ability to identify scale degrees (do, re fa, etc.) without knowing the exact name of notes. Absolute pitch (perfect pitch) is being able to name notes (C, D, E, etc.) upon hearing them).
Every tone in the major scale has a tendency to resolve to C, or "do."
The strongest tendency is "ti" to "do," B to C in the key of C. Play a I-IV-V-I cadence in C and then play the note B and release it. You should strongly sense the tendency of the note to want to resolve to C.
Play a I-IV-V-I cadence in C again and then press and release G. G is "sol" which has a strong tendency to resolve to "do," C. This is a strong tendency but not as strong as "ti" to "do."
Play a I-IV-V-I cadence in C again and then press and release D. D is "re" which has a strong tendency to resolve to "do," C. This is also a strong tendency.
Those are the primary tendencies (notes that resolve to "do" directly.)
The rest of the diatonic notes are secondary tendencies that resolve to "do" via other notes.
Here are the secondary tendencies:
"fa" to "mi"
"mi" to "do" via "re" (mi-re-do)
"la" to "sol"
Play your I-IV-V-I cadence in C and play and release each of the notes to see if you can hear the tendency. If you can't, play the tendency on the piano to teach your ear to hear the resolution pattern.
You can also teach your ear the patterns by singing (or playing) the following sequence: do-re-do. Do-fa-me. Do-la-sol. Do-ti-do. Do-sol-do. Mi-re-do.
I explain all of this as well as the chromatic tendencies (Db, Eb, F#, Ab, Bb) in the lesson here (paid subscription required):https://www.jazzpianoonline.com/courses/tendency-tones-ear-training
When you have the tendencies firmly in your ear, a fun party trick is to play the I-IV-V-I cadence and have your guests play notes while you guess them. They will think you have perfect pitch!