A student sold candy bars and bags of popcorn for a school fund-raiser.

• The student sold a total of 240 candy bars and bags of popcorn.
• The price of each candy bar was $1, and the price of each bag of popcorn was $2.
• The student sold $300 worth of candy bars and bags of popcorn.
How many candy bars did this student sell for the school fund-raiser?

Let's say the number of candy bars the student sold is 'x' and the number of bags of popcorn is 'y.'

From the statement "The student sold a total of 240 candy bars and bags of popcorn," we can write the equation:

x + y = 240 ----(1)

From the statement "The price of each candy bar was $1, and the price of each bag of popcorn was $2," we can write another equation based on the total sales:

1x + 2y = $300 ----(2)

To solve this system of equations, we can use substitution or elimination.

Let's use elimination. Multiply equation (1) by 2:

2(x + y) = 2(240)
2x + 2y = 480 ----(3)

Next, subtract equation (2) from equation (3):

(2x + 2y) - (1x + 2y) = 480 - 300
2x + 2y - x - 2y = 180
x = 180

The student sold 180 candy bars for the school fund-raiser.