Dany bought a total of 24 game cards some of which cost $0.25 each and some of which cost $0.15 each. If Dany spent $4.2 to buy these cards, how many cards of each type did he buy?	Select the correct option: A) 4 B) 10 C) 7 D) 18 E) 12
Let X be the number of cards that cost $0.25 each and Y the number of cards that cost $0.15 each. The total number of cards is 24. Hence   X + Y = 24   If X is the number of cards at $0.25, then the X cards cost   0.25 X   If Y is the number of cards at $0.15, then the Y cards cost   0.15 Y   The total cost of the X cards and the the Y cards is known to be $4.2 and also given by   0.25 X + 0.15 Y = 4.2   We now need to solve the system of equations   X + Y = 24   0.25 X + 0.15 Y = 4.2   The first equation gives Y = 24 - X. Substitute y by 24 - x in the second equation and solve   0.25 X + 0.15 (24 - X) = 4.2   X(0.25 - 0.15) + 3.6 = 4.2   0.1 X = 0.6   X = 6 and Y = 24 - 6= 
<gadget id="calculator">24 - 6</gadget>
<output>18</output>
18   correct answer 18
<result>D</result>
Dany bought a total of 24 game cards some of which cost $0.25 each and some of which cost $0.15 each. If Dany spent $4.2 to buy these cards, how many cards of each type did he buy?