Changed around line 1
+ const questions = [
+ {
+ question: "What does SAP BTP stand for?",
+ options: ["SAP Business Technology Platform", "SAP Business Transaction Platform", "SAP Basic Technology Platform", "SAP Business Tools Platform"],
+ answer: "SAP Business Technology Platform"
+ },
+ {
+ question: "Which of the following is a core service of SAP BTP?",
+ options: ["SAP HANA", "SAP Fiori", "SAP Cloud Application Programming Model", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is the primary purpose of SAP BTP?",
+ options: ["To provide a platform for developing and extending SAP applications", "To manage SAP licenses", "To provide hardware infrastructure", "To offer SAP training programs"],
+ answer: "To provide a platform for developing and extending SAP applications"
+ },
+ {
+ question: "Which programming language is commonly used in SAP BTP?",
+ options: ["Java", "ABAP", "JavaScript", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is SAP HANA in the context of SAP BTP?",
+ options: ["A database management system", "A cloud platform", "A programming language", "A user interface framework"],
+ answer: "A database management system"
+ },
+ {
+ question: "Which of the following is NOT a component of SAP BTP?",
+ options: ["SAP Analytics Cloud", "SAP Integration Suite", "SAP SuccessFactors", "SAP Business Application Studio"],
+ answer: "SAP SuccessFactors"
+ },
+ {
+ question: "What is the role of SAP Fiori in SAP BTP?",
+ options: ["To provide a user interface for SAP applications", "To manage database operations", "To handle integrations", "To provide analytics"],
+ answer: "To provide a user interface for SAP applications"
+ },
+ {
+ question: "Which service in SAP BTP is used for integrating different systems?",
+ options: ["SAP Integration Suite", "SAP Analytics Cloud", "SAP HANA", "SAP Fiori"],
+ answer: "SAP Integration Suite"
+ },
+ {
+ question: "What is the SAP Cloud Application Programming Model?",
+ options: ["A framework for building enterprise applications", "A database management system", "A user interface framework", "A cloud infrastructure service"],
+ answer: "A framework for building enterprise applications"
+ },
+ {
+ question: "Which of the following is a benefit of using SAP BTP?",
+ options: ["Scalability", "Flexibility", "Integration capabilities", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is the purpose of SAP Business Application Studio?",
+ options: ["To develop and extend SAP applications", "To manage SAP licenses", "To provide hardware infrastructure", "To offer SAP training programs"],
+ answer: "To develop and extend SAP applications"
+ },
+ {
+ question: "Which of the following is a type of deployment option in SAP BTP?",
+ options: ["Cloud Foundry", "Kubernetes", "ABAP Environment", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is the primary function of SAP Analytics Cloud?",
+ options: ["To provide business intelligence and analytics", "To manage database operations", "To handle integrations", "To provide a user interface"],
+ answer: "To provide business intelligence and analytics"
+ },
+ {
+ question: "Which of the following is a key feature of SAP BTP?",
+ options: ["Multi-cloud support", "Single-cloud support", "On-premise only", "None of the above"],
+ answer: "Multi-cloud support"
+ },
+ {
+ question: "What is the role of SAP HANA Cloud in SAP BTP?",
+ options: ["To provide a cloud-based database service", "To manage SAP licenses", "To provide hardware infrastructure", "To offer SAP training programs"],
+ answer: "To provide a cloud-based database service"
+ },
+ {
+ question: "Which of the following is a use case for SAP BTP?",
+ options: ["Developing custom applications", "Integrating systems", "Analyzing data", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is the purpose of SAP BTP's extensibility features?",
+ options: ["To allow customization of SAP applications", "To manage SAP licenses", "To provide hardware infrastructure", "To offer SAP training programs"],
+ answer: "To allow customization of SAP applications"
+ },
+ {
+ question: "Which of the following is a security feature in SAP BTP?",
+ options: ["Identity and Access Management", "Data encryption", "Network security", "All of the above"],
+ answer: "All of the above"
+ },
+ {
+ question: "What is the role of SAP BTP in digital transformation?",
+ options: ["To provide a platform for innovation and agility", "To manage SAP licenses", "To provide hardware infrastructure", "To offer SAP training programs"],
+ answer: "To provide a platform for innovation and agility"
+ },
+ {
+ question: "Which of the following is a key benefit of SAP BTP's multi-cloud support?",
+ options: ["Flexibility in choosing cloud providers", "Reduced costs", "Improved performance", "All of the above"],
+ answer: "All of the above"
+ }
+ ];
+
+ let currentQuestionIndex = 0;
+ let score = 0;
+
+ const questionElement = document.getElementById('question');
+ const optionsElement = document.getElementById('options');
+ const scoreElement = document.getElementById('score');
+ const currentQuestionElement = document.getElementById('current-question');
+ const resultsElement = document.getElementById('results');
+ const finalScoreElement = document.getElementById('final-score');
+ const reportElement = document.getElementById('report');
+ const restartButton = document.getElementById('restart');
+
+ function showQuestion() {
+ const question = questions[currentQuestionIndex];
+ questionElement.textContent = question.question;
+ optionsElement.innerHTML = '';
+ question.options.forEach(option => {
+ const button = document.createElement('button');
+ button.textContent = option;
+ button.addEventListener('click', () => selectAnswer(option));
+ optionsElement.appendChild(button);
+ });
+ currentQuestionElement.textContent = currentQuestionIndex + 1;
+ }
+
+ function selectAnswer(selectedOption) {
+ const question = questions[currentQuestionIndex];
+ if (selectedOption === question.answer) {
+ score++;
+ } else {
+ const reportItem = document.createElement('div');
+ reportItem.innerHTML = `
Question: ${question.question}
Your Answer: ${selectedOption}
Correct Answer: ${question.answer}
`;
+ reportElement.appendChild(reportItem);
+ }
+ scoreElement.textContent = score;
+ currentQuestionIndex++;
+ if (currentQuestionIndex < questions.length) {
+ showQuestion();
+ } else {
+ showResults();
+ }
+ }
+
+ function showResults() {
+ document.getElementById('quiz').classList.add('hidden');
+ resultsElement.classList.remove('hidden');
+ finalScoreElement.textContent = score;
+ }
+
+ restartButton.addEventListener('click', () => {
+ currentQuestionIndex = 0;
+ score = 0;
+ scoreElement.textContent = score;
+ reportElement.innerHTML = '';
+ document.getElementById('quiz').classList.remove('hidden');
+ resultsElement.classList.add('hidden');
+ showQuestion();
+ });
+
+ showQuestion();