In a science competition with ten problems, a student gets 5 points for a correct answer and loses 2 points for an incorrect answer. If Alice answered every problem and her score was 29, how many correct answers did she have?

i'm thinking you have to set up an equation but i'm so confused on how to set it up and I have basically tried everything to solve this question but I don't know how to.

If there were c correct answers, then there were 10-c wrong answers. So, now use her score to find c:

5c - 2(10-c) = 29

To solve this problem, you can set up a system of equations based on the given information.

Let's assume that the number of correct answers is represented by 'x'. Since there are 10 problems in total, the number of incorrect answers would be (10 - x).

Based on the scoring system, the total score can be determined by multiplying the number of correct answers by 5 points and subtracting the number of incorrect answers multiplied by 2 points:

5x - 2(10 - x) = 29

Now, simplify and solve the equation:

5x - 20 + 2x = 29

Combine like terms:

7x - 20 = 29

Add 20 to both sides:

7x = 49

Divide by 7:

x = 7

Therefore, Alice answered 7 questions correctly.