NaN function in a math game

I am following a tutorial in a book I purchased for a math game, and even though my code is exactly the way it is on the page, I keep getting an error.

First of all, here is the AS:

if (guess == correct) {
result = “Great Job!”;
numRight++;
} else {
result = X+"+"+Y+"="+correct;
}

numTries++;
percRight = numRight/numTries*100;
_back.onRelease = function() {
if (numTries<5) {
_root.gotoAndStop(“solve”);
guess = “”
} else {
numRight = 0;
numTries = 0;
guess = “”;
_root.gotoAndStop(“choose”);
}
}

When it tries to calculate the percentage (percRight = numRight/numTries*100; ) i get “NaN” (Not a number) in the dynamic text box. Any thoughts?