Answers:
Q1 = 6
Q3 = 21
The data is already sorted for us. If it wasn't, then you would have to write the values from smallest to largest.
The median is the middle most value 9 (in slot 4)
The median separates the data into two halves, which I'll call the lower and upper half
lower half = {4,6,8}
upper half = {13,21,31}
The median of the lower half is 6, and this is the value of Q1.
The median of the upper half is 21. This is the value of Q3