Code:
In .txt file
Step-by-step explanation:
I made the code a bit more flexible than instructed, for example, you don't need two different functions for the two chessboards. And you can easily edit the chessboard's size, numbers and coordinates.
Please ask me if there is anything you don't understand, or if the code isn't working correctly.