In the last math test we did in class, 18 students answered the first question correctly, 23 answered the second question correctly, 8 answered the two questions correctly and 11 answered the two questions incorrectly.
How many students are in my class?
There are 11 students who answered the two questions poorly and 18 who answered the first question well, so that these two sets can be added calmly (11 + 18 = 29).
When we consider the next set, that of the 23 that answered the second question well, we have a problem, and that is that some may be in one of the previous groups, if they have also responded to the first.
How many of those who responded well to the first responded well to both? According to the statement, 8. Therefore, if we add the 23 to the 29, we would be counting twice at the 8 and therefore we would have to subtract them, that is, that the final result would be 11 + 18 + 23 - 8 = 44 students.