= 6 and $computer <= $you - 2) { $yourSets += 1; $history .= " " . $you . "-" . $computer; $you = 0; $computer = 0; } $feedback = "That's right the answer was " . ($n1 + $n2); $n1 = rand(0, 100); $n2 = rand(0, 100); $wrong = 0; } else { $wrong += 1; if ($wrong >= 3) { $computer += 1; if ($computer >= 6 and $you <= $computer - 2) { $computerSets += 1; $history .= " $you - $computer"; $computer = 0; $you = 0; } $feedback = "You missed, $n1 + $n2 is in fact " . ($n1 + $n2) . " and not " . $answer . " as you said."; $n1 = rand(0, 100); $n2 = rand(0, 100); $wrong = 0; } else { $feedback = "Nope, you have " . (3 - $wrong) . " tries before you lose the point."; } } } else { $feedback = "Welcome"; $you = 0; $computer = 0; $n1 = rand(0, 100); $n2 = rand(0, 100); $wrong = 0; $computerSets = 0; $yourSets = 0; $history = " N/A "; } $question = "What is $n1 + $n2? "; ?>

Current score: -

Sets: - ()

>

Click to proceed.

Click to reset.