Fix this code

<!DOCTYPE html>
<html>
<head>
<title>Simple Quiz</title>
</head>
<body>
<h1>Simple Quiz</h1>

<div id="quiz">
<p id="question">What is the capital of France?</p>
<input type="radio" name="answer" value="paris" /> Paris<br />
<input type="radio" name="answer" value="london" /> London<br />
<input type="radio" name="answer" value="berlin" /> Berlin<br />
<button onclick="checkAnswers()">Submit</button>

<script>
function checkAnswers() {
// Add your answer checking logic here
// For example, comparing the user's input with the correct answer
let userAnswer = document.getElementById("userInput").value;
let correctAnswer = "Your Correct Answer Here";

if (userAnswer.toLowerCase() === correctAnswer.toLowerCase()) {
alert("Correct Answer!");
} else {
alert("Incorrect Answer. Please try again.");
}
}
</script>
</div>

<p id="result"></p>

<script>
function CheckAnswer() {
var answer = document.querySelector('input[name="answer"]:checked');
if (answer) {
if (answer.value === "paris") {
document.getElementById("result").innerText = "Correct!";
} else {
document.getElementById("result").innerText =
"Incorrect. The correct answer is Paris.";
}
} else {
document.getElementById("result").innerText =
"Please select an answer.";
}
}
</script>
</body>
</html>

<!DOCTYPE html>

<html>
<head>
<title>Simple Quiz</title>
</head>
<body>
<h1>Simple Quiz</h1>

<div id="quiz">
<p id="question">What is the capital of France?</p>
<input type="radio" name="answer" value="paris" /> Paris<br />
<input type="radio" name="answer" value="london" /> London<br />
<input type="radio" name="answer" value="berlin" /> Berlin<br />
<button onclick="checkAnswers()">Submit</button>
</div>

<p id="result"></p>

<script>
function checkAnswers() {
var answer = document.querySelector('input[name="answer"]:checked');
if (answer) {
if (answer.value === "paris") {
document.getElementById("result").innerText = "Correct!";
} else {
document.getElementById("result").innerText =
"Incorrect. The correct answer is Paris.";
}
} else {
document.getElementById("result").innerText =
"Please select an answer.";
}
}
</script>
</body>
</html>