Find the percent composition of a compound containing sodium and chlorine if 24.34g of the compound contains 13.45g of sodium.

My work:
Molar mass of NaCl: MNa +MCl
= 22.99 g/mol + 35.45 g/mol
= 58.44 g/mol

Percent composition of Na:
22.99 g/mol / 58.44 g/mol x 100
= 39.34% Na

Percent composition of Cl:
35.45 g/mol / 58.44 x 100
= 60.66% Cl

This is where I get stuck. How do the 24.34g and 13.45g come into play?

you are on a goose chase.

percent Na=13.45/24.34= 55 percent
percent Cl=10.89/24.34=44.7 percent

I'm glad you asked that question. All of the work you have done is exactly right BUT you haven't worked the problem. You worked a similar problem but not the one stated.

% Na FROM THE DATA IN THE PROBLEM is
(g Na/total g)*100 = (13.45/24.34)*100 = 55.26%
Then % Cl = 100%-55.25 = ?

You assumed the formula is NaCl with your work; the problem doesn't tell you the formula but gives the data to calculate percent.
In fact I took the data given and it gives a formula very close to Na2Cl. Read the problem again and notice it says a compound containing Na and Cl but it never gives the formula. Your prof just made up a problem.

Thank you guys so much for helping me! I see my steps were really unnecessary.

To determine the percent composition of a compound containing sodium and chlorine, you need to consider the masses of sodium and chlorine present in the given sample.

Given that 24.34g of the compound contains 13.45g of sodium, you can find the mass of chlorine in the compound by subtracting the mass of sodium from the total mass:

Mass of chlorine = Total mass − Mass of sodium
Mass of chlorine = 24.34g − 13.45g
Mass of chlorine = 10.89g

Now, with the masses of sodium and chlorine determined in the given sample, you can calculate their respective percent compositions.

Percent composition of sodium:
Percent composition = (Mass of sodium / Total mass) x 100
Percent composition = (13.45g / 24.34g) x 100
Percent composition of sodium = 55.19%

Percent composition of chlorine:
Percent composition = (Mass of chlorine / Total mass) x 100
Percent composition = (10.89g / 24.34g) x 100
Percent composition of chlorine = 44.81%

Thus, in the given compound, the percent composition is approximately 55.19% sodium and 44.81% chlorine.