Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>XAT Score Calculator</title>
    <style>
        /* General Reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            background-color: #f9f9f9;
            padding: 20px;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            background: #ffffff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .calculator-section {
            margin-bottom: 50px;
            padding-bottom: 30px;
            border-bottom: 2px solid #ddd;
        }

        h1 {
            font-size: 24px;
            color: #333;
            text-align: center;
            margin-bottom: 20px;
        }

        form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .input-group {
            display: flex;
            flex-direction: column;
        }

        .input-group label {
            margin-bottom: 5px;
            font-weight: bold;
            color: #444;
        }

        .input-group input {
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        button {
            padding: 10px 20px;
            font-size: 16px;
            color: #fff;
            background: #007bff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        button:hover {
            background: #0056b3;
        }

        .external-link-btn {
            background: #28a745;
            margin-top: 10px;
        }

        .external-link-btn:hover {
            background: #1e7e34;
        }

        .result {
            margin-top: 20px;
            text-align: center;
        }

        .result h2 {
            font-size: 20px;
            margin-bottom: 10px;
        }

        .content-section {
            margin-top: 50px;
        }

        .content-section h2 {
            font-size: 20px;
            color: #444;
            margin-bottom: 15px;
        }

        .content-section p {
            margin-bottom: 15px;
            text-align: justify;
            color: #555;
        }

        .content-section ul,
        .content-section ol {
            margin-left: 20px;
            margin-bottom: 15px;
        }

        ul li,
        ol li {
            margin-bottom: 10px;
            color: #555;
        }

        @media (max-width: 768px) {
            h1 {
                font-size: 20px;
            }

            button {
                font-size: 14px;
                padding: 8px 15px;
            }

            .content-section h2 {
                font-size: 18px;
            }

            .content-section p {
                font-size: 14px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- Calculator Section -->
        <div class="calculator-section">
            <h1>XAT Score Calculator</h1>
            <form id="scoreForm">
                <div class="input-group">
                    <label for="correctAnswers">Number of Correct Answers:</label>
                    <input type="number" id="correctAnswers" min="0" required>
                </div>
                <div class="input-group">
                    <label for="incorrectAnswers">Number of Incorrect Answers:</label>
                    <input type="number" id="incorrectAnswers" min="0" required>
                </div>
                <div class="input-group">
                    <label for="unattemptedQuestions">Number of Unattempted Questions:</label>
                    <input type="number" id="unattemptedQuestions" min="0" required>
                </div>
                <button type="submit">Calculate Score</button>
            </form>
            <div id="result" class="result">
                <h2>Your XAT Score:</h2>
                <p id="score"></p>
            </div>
            <button class="external-link-btn" onclick="openExternalLink()">Visit Cracku XAT Score Calculator (Pro)</button>
        </div>

        <!-- Content Section -->
        <div class="content-section">
            <h2>How the Cracku XAT Score Calculator Helps You?</h2>
            <p>The Cracku XAT Score Calculator is a simple and effective tool designed to help students calculate their scores in the XAT exam. The XAT (Xavier Aptitude Test) is one of the most important exams for students aspiring to join top management schools. With this calculator, you can get a clear idea of your potential score by entering basic details about your performance.</p>
            
            <h2>What is the XAT Exam?</h2>
            <p>The XAT exam is a national-level entrance test conducted every year for admission to MBA programs in top institutes. It is a competitive test with different sections like verbal ability, decision-making, quantitative aptitude, and general knowledge. Each correct answer gives you marks, while incorrect answers lead to negative marking. Questions that are not attempted beyond a certain limit may also result in penalties.</p>
            
            <h2>Why Use the XAT Score Calculator?</h2>
            <p>Calculating your XAT score manually can be a long and confusing process, especially when you consider negative marking and penalties for unattempted questions. This calculator simplifies everything for you. All you need to do is enter the number of correct answers, incorrect answers, and unattempted questions. The tool automatically calculates your score while considering all penalties and gives you an accurate result in seconds.</p>
          
                      <h2>Key Features of the XAT Score Calculator</h2>
            <ul>
                <li><b>User-Friendly:</b> You don’t need to be a tech expert to use this tool. The form is simple, and the results are instant.</li>
                <li><b>Accurate Results:</b> The calculator uses official marking rules, including penalties for wrong and unattempted answers, to ensure accuracy.</li>
                <li><b>Saves Time:</b> Manual calculations can take time and may lead to mistakes. This tool provides a quick and error-free solution.</li>
                <li><b>Free to Use:</b> The calculator is completely free and available to all users.</li>
            </ul>
            
            <h2>How to Use the Calculator</h2>
            <ol>
                <li>Enter the number of questions you answered correctly in the first field.</li>
                <li>Enter the number of incorrect answers in the second field.</li>
                <li>Enter the number of unattempted questions in the third field.</li>
                <li>Click on the “Calculate Score” button.</li>
                <li>Your XAT score will be displayed below the calculator in a matter of seconds.</li>
            </ol>
            
            <h2>Tips to Score Better in the XAT Exam</h2>
            <ul>
                <li><b>Practice Regularly:</b> Solve mock tests and sample papers to get familiar with the exam pattern.</li>
                <li><b>Understand the Negative Marking:</b> Focus on accuracy to avoid losing marks for incorrect answers.</li>
                <li><b>Plan Your Time:</b> Divide your time wisely between sections and ensure that you attempt enough questions to minimize penalties.</li>
                <li><b>Stay Updated:</b> Prepare for the general knowledge section by staying updated with current events.</li>
            </ul>
            
            <h2>Final Thoughts</h2>
            <p>The Cracku XAT Score Calculator is a must-have tool for anyone preparing for the XAT exam. It not only helps you track your performance but also motivates you to aim higher. Use this tool after every mock test to understand your strengths and weaknesses. The more you practice, the closer you will be to achieving your dream score.</p>
        </div>
    </div>

    <script src="script.js"></script>
</body>
</html>
              
            
!

CSS

              
                /* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.calculator-section {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #ddd;
}

h1 {
    font-size: 24px;
    color: #444;
    text-align: center;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #0056b3;
}

.external-link-btn {
    background: #28a745;
    margin-top: 10px;
}

.external-link-btn:hover {
    background: #1e7e34;
}

.result {
    margin-top: 20px;
    text-align: center;
}

.result h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.content-section {
    margin-top: 50px;
}

.content-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.content-section p {
    margin-bottom: 15px;
    text-align: justify;
}

@media (max-width: 768px) {
    h1 {
        font-size: 20px;
    }

    .content-section h2 {
        font-size: 18px;
    }

    .content-section p {
        font-size: 14px;
    }
}
              
            
!

JS

              
                
// Handle form submission for score calculation
document.getElementById('scoreForm').addEventListener('submit', function(event) {
    event.preventDefault();

    const correctAnswers = parseInt(document.getElementById('correctAnswers').value) || 0;
    const incorrectAnswers = parseInt(document.getElementById('incorrectAnswers').value) || 0;
    const unattemptedQuestions = parseInt(document.getElementById('unattemptedQuestions').value) || 0;

    const negativeMarking = 0.25;
    const unattemptedPenaltyThreshold = 8;
    const unattemptedPenalty = 0.10;

    let score = correctAnswers - (incorrectAnswers * negativeMarking);

    if (unattemptedQuestions > unattemptedPenaltyThreshold) {
        score -= (unattemptedQuestions - unattemptedPenaltyThreshold) * unattemptedPenalty;
    }

    document.getElementById('score').textContent = score.toFixed(2);
    document.querySelector('.result').style.display = 'block';
});

// Open external link in a new tab
function openExternalLink() {
    window.open('https://cgpatopercentage.in.net', '_blank');
}
              
            
!
999px

Console