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 assume the student sold x candy bars.

So, the student sold 240 - x bags of popcorn.
The total amount earned from selling candy bars is x * $1 = $x.
The total amount earned from selling bags of popcorn is (240 - x) * $2 = $480 - $2x.
We are given that the student sold a total of $300 worth of candy bars and bags of popcorn, so:
$x + ($480 - $2x) = $300
Simplifying the equation, we get:
$x + $480 - $2x = $300
Combining like terms, we get:
-$x + $480 = $300
Subtracting $480 from both sides of the equation gives:
-$x = $300 - $480
Simplifying the equation, we get:
-$x = -$180
Dividing both sides by -1, we get:
$x = $180
Therefore, the student sold 180 candy bars for the school fund-raiser. Answer: \boxed{180}.