A bakery sells cupcakes for $2 each and cookies for $1.50 each. If the bakery sold a total of 240 items, which consisted of $500 worth of cupcakes and cookies, how many cupcakes did they sell?
Let $x$ represent the number of cupcakes sold, and $y$ represent the number of cookies sold. You can set up the following equations based on the given information:
1. $x + y = 240$
2. $2x + 1.5y = 500$