when i put this in it says checkanswer is not define i need you to fix it plz

<h2>What is the capital of France?</h2>
<button onclick="checkAnswer('Paris')">Paris</button>
<button onclick="checkAnswer('London')">London</button>
<button onclick="checkAnswer('Berlin')">Berlin</button>
<div id="result"></div>

To fix the issue, you need to define the `checkAnswer` function in your code. Here is an example of how you can define the function:

```html
<h2>What is the capital of France?</h2>
<button onclick="checkAnswer('Paris')">Paris</button>
<button onclick="checkAnswer('London')">London</button>
<button onclick="checkAnswer('Berlin')">Berlin</button>
<div id="result"></div>

<script>
function checkAnswer(answer) {
if (answer === 'Paris') {
document.getElementById('result').innerHTML = 'Correct! Paris is the capital of France.';
} else {
document.getElementById('result').innerHTML = 'Incorrect. Try again.';
}
}
</script>
```

With this code, when you click on one of the buttons, it will check if the answer matches 'Paris' and display the appropriate message in the `result` div.