So do it, S37 (or SREC as it is properly known) isn't complicated:
https://en.wikipedia.org/wiki/SREC_(file_format)[
^]
All you have to do is:
1) Read each line
2) Strip off the line header bytes ("S0", "S1", etc.)
3) Pull out the in-file checksum, and convert it to a byte
4) Read each pair of hex digits into a byte.
5) Sum all the bytes.
6) Complement the sum.
7) Compare the calculated value with the in=file value you processed earlier.
8) Continue from (2) with the next line.
This isn't complex: but it's your homework, so I'll give you no code!