The Beatles Lyrics Quiz
Jan 10, 2024
v.0
Test your knowledge of The Beatles lyrics with this fun quiz! Quiz Lyrics The Beatles

Versions  

Bugs  
None!

Get This App On Your Website

1. Copy the code above with the iframe and link.
2. Paste the code into your website.
3. Resize the iframe to fit your website.

Javascript, HTML, CSS Code

                <html>
<head>
<script type="text/javascript"> window.addEventListener('error', function(event) { var message = JSON.parse(JSON.stringify(event.message)); var source = event.filename; var lineno = event.lineno; var colno = event.colno; var error = event.error; window.parent.postMessage({ type: 'iframeError', details: { message: message, source: source, lineno: lineno, colno: colno, error: error ? error.stack : '' } }, '*'); }); window.addEventListener('unhandledrejection', function(event) { window.parent.postMessage({ type: 'iframePromiseRejection', details: { reason: event.reason } }, '*'); }); </script>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>The Beatles Lyrics Quiz</title>
<meta name="description" content="Test your knowledge of The Beatles lyrics with this fun quiz!">
<meta name="keywords" content="The Beatles, lyrics, quiz">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
const quizQuestions = [
{
question: "Which song contains the lyrics: 'I get high with a little help from my friends'?",
options: ["Hey Jude", "Eleanor Rigby", "With a Little Help from My Friends", "Let It Be"],
answer: "With a Little Help from My Friends"
},
{
question: "Which song contains the lyrics: 'Yellow matter custard, dripping from a dead dog's eye'?",
options: ["I Want to Hold Your Hand", "Strawberry Fields Forever", "Lucy in the Sky with Diamonds", "A Hard Day's Night"],
answer: "Lucy in the Sky with Diamonds"
},
{
question: "Which song contains the lyrics: 'Yesterday, all my troubles seemed so far away'?",
options: ["Yesterday", "Here Comes the Sun", "Blackbird", "Twist and Shout"],
answer: "Yesterday"
},
{
question: "Which song contains the lyrics: 'I am he as you are he as you are me and we are all together'?",
options: ["I Am the Walrus", "Penny Lane", "Ticket to Ride", "Help!"],
answer: "I Am the Walrus"
},
{
question: "Which song contains the lyrics: 'Hey Jude, don't make it bad'?",
options: ["Hey Jude", "Strawberry Fields Forever", "Let It Be", "Yellow Submarine"],
answer: "Hey Jude"
},
{
question: "Which song contains the lyrics: 'Here comes the sun, and I say It's all right'?",
options: ["Here Comes the Sun", "All You Need Is Love", "Hello, Goodbye", "The Long and Winding Road"],
answer: "Here Comes the Sun"
},
{
question: "Which song contains the lyrics: 'Blackbird singing in the dead of night'?",
options: ["Blackbird", "Penny Lane", "A Hard Day's Night", "Twist and Shout"],
answer: "Blackbird"
},
{
question: "Which song contains the lyrics: 'She's got a ticket to ride'?",
options: ["Let It Be", "Ticket to Ride", "Eleanor Rigby", "I Want to Hold Your Hand"],
answer: "Ticket to Ride"
},
{
question: "Which song contains the lyrics: 'All you need is love, love, love is all you need'?",
options: ["All You Need Is Love", "Yesterday", "Help!", "Hey Jude"],
answer: "All You Need Is Love"
},
{
question: "Which song contains the lyrics: 'You say goodbye, and I say hello'?",
options: ["Hello, Goodbye", "Strawberry Fields Forever", "I Am the Walrus", "Yellow Submarine"],
answer: "Hello, Goodbye"
}
];

let currentQuestion = 0;
let score = 0;

function showQuestion() {
const questionElement = document.getElementById("question");
const optionsElement = document.getElementById("options");
const nextButton = document.getElementById("next");

questionElement.textContent = quizQuestions[currentQuestion].question;
optionsElement.innerHTML = "";

quizQuestions[currentQuestion].options.forEach((option) => {
const optionElement = document.createElement("button");
optionElement.className = "btn btn-primary";
optionElement.textContent = option;
optionElement.addEventListener("click", selectOption);
optionsElement.appendChild(optionElement);
});

nextButton.style.display = "none";
}

function selectOption(event) {
const selectedOption = event.target.textContent;
const correctAnswer = quizQuestions[currentQuestion].answer;
const resultElement = document.getElementById("result");
const nextButton = document.getElementById("next");

if (selectedOption === correctAnswer) {
score++;
resultElement.innerHTML = "<i class='fa fa-check'></i> Correct!";
resultElement.classList.add("text-success");
} else {
resultElement.innerHTML = "<i class='fa fa-times'></i> Incorrect!";
resultElement.classList.add("text-danger");
}

nextButton.style.display = "block";
nextButton.addEventListener("click", nextQuestion);
}

function nextQuestion() {
const resultElement = document.getElementById("result");
const nextButton = document.getElementById("next");

resultElement.textContent = "";
resultElement.classList.remove("text-success", "text-danger");

currentQuestion++;

if (currentQuestion === quizQuestions.length) {
showResult();
} else {
showQuestion();
}

nextButton.style.display = "none";
}

function showResult() {
const quizContainer = document.getElementById("quiz-container");
const resultContainer = document.getElementById("result-container");
const scoreElement = document.getElementById("score");

quizContainer.style.display = "none";
resultContainer.style.display = "block";

scoreElement.textContent = `You scored ${score} out of ${quizQuestions.length}!`;
}

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
showQuestion();
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
body {
background-color: #f6f8fa;
font-family: 'Roboto', sans-serif;
}

.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}

h1 {
text-align: center;
margin-bottom: 30px;
}

.btn-primary {
width: 100%;
margin-bottom: 10px;
}

.text-success {
color: #28a745;
}

.text-danger {
color: #dc3545;
}

#result-container {
display: none;
}

#result {
margin-bottom: 20px;
text-align: center;
font-size: 18px;
}

</style>

<link rel="canonical" href="https://calculator.tools/app/the-beatles-lyrics-quiz-1194/">
<meta charset="utf-8">

</head>
<body>
<div id="main-container" class="container">
<h1>The Beatles Lyrics Quiz</h1>
<div id="quiz-container">
<p id="question"></p>
<div id="options"></div>
<p id="result"></p>
<button id="next" class="btn btn-primary">Next</button>
</div>
<div id="result-container">
<p id="score"></p>
</div>
</div>
<script type="text/javascript"> var localStoragePrefix = "ct-1194"; var lastSave = 0; function saveLocal(data) { if (Date.now() - lastSave < 1000) { return; } let cookie = localStoragePrefix + "=" + JSON.stringify(data) + "; path=" + window.location.pathname + "'; SameSite=Strict"; cookie += "; expires=" + new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 1000).toUTCString(); document.cookie = cookie; lastSave = Date.now(); } function loadLocal() { var cookiePrefix = localStoragePrefix + "="; var cookieStart = document.cookie.indexOf(cookiePrefix); if (cookieStart > -1) { let cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) { cookieEnd = document.cookie.length; } var cookieData = document.cookie.substring(cookieStart + cookiePrefix.length, cookieEnd); return JSON.parse(cookieData); } } </script>
<script type="text/javascript"> window.addEventListener('load', function() { var observer = new MutationObserver(function() { window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); observer.observe(document.body, {attributes: true, childList: true, subtree: true}); window.parent.postMessage({height: document.documentElement.scrollHeight || document.body.scrollHeight},"*"); }); </script>
</body>
</html>

NEW APPS

These are apps made by the community!

FAQ

What is Calculator Tools?

Calculator Tools allows you to instantly create and generate any simple one page web app for free and immediately have it online to use and share. This means anything! Mini apps, calculators, trackers, tools, games, puzzles, screensavers... anything you can think of that the AI can handle.

The AI uses Javacript, HTML, and CSS programming to code your app up in moments. This currently uses GPT-4 the latest and most powerful version of the OpenAI GPT language model.

What Do You Mean Make An App?

Have you ever just wanted a simple app but didn't want to learn programming or pay someone to make it for you? Calculator Tools is the solution! Just type in your prompt and the AI will generate a simple app for you in seconds. You can then customize it to your liking and share it with your friends.

AI has become so powerful it is that simple these days.

Does This Use ChatGPT?

It uses GPT-4 which is the most powerful model for ChatGPT.

Calculator Tools does not remember things from prompt to prompt, each image is a unique image that does not reference any of the images or prompts previously supplied.