Following is a letter written by Kailash to his class teacher, requesting leave for a condolence. You can use the same format by simply replacing the name with yours and adding your school details in respective places
From
Kailash,
Class VII,
XXX School,
ZZZ.
To
The Class teacher,
Class VII,
XXX School,
ZZZ.
Respected Madam,
Since my grandfather passed away on (Date) I was not able make it to the class for past 3 days
I request you to kindly excuse me and accept my absence on those 3 days.
Thanking You,
Yours Truly,
Kailash