Mrs Sim gave pencils to every student in her class. If she gave each student 8 pencils, she would have 3 pencils left. If she gave 3 pencils to each student, she would have 188 pencils left. How mant students were there in Mrs Sims's class?

let the number of students be n

number of pencils = 8n+3
or
number of pencils = 3n + 188

8n + 3 = 3n + 188
5n = 185
n = 37

she has 37 students and 299 pencils

check:
8 pencils per student ---> 296 , 3 left over, ✔
3 pencils per student ---> 111 , 188 left over ✔

To solve this problem, we can use a system of equations.

Let's assume there are 'S' students in Mrs Sim's class.

The first piece of information tells us that if she gave each student 8 pencils, she would have 3 pencils left. This can be represented as an equation:

8S + 3 = X (where X represents the total number of pencils Mrs Sim had initially)

The second piece of information tells us that if she gave each student 3 pencils, she would have 188 pencils left. This can be represented as another equation:

3S + 188 = X

Now we have a system of two equations with two variables (S and X). We can solve this system to find the value of S, which will represent the number of students in Mrs Sim's class.

Let's solve the system:

8S + 3 = 3S + 188

Subtract 3S from both sides:

5S + 3 = 188

Subtract 3 from both sides:

5S = 185

Divide both sides by 5:

S = 37

Therefore, there were 37 students in Mrs Sim's class.