← run 2026-06-30T130601Z-3ea440b-minimal

gemma-4-31b@or — web-tip-calculator

rep 1 PASS

pi 107.8s · verify 8.3s · 6335 tok · responded: google/gemma-4-31b-it · transcript

screenshot

verify output
CHECK PASS: required elements exist
CHECK PASS: total: bill=100 tip=20 -> 120.00
CHECK PASS: total: bill=50 tip=10 -> 55.00
CHECK PASS: two-decimal formatting
CHECK PASS: split: bill=100 tip=15 people=3 -> total 115.00, perPerson 38.33
CHECK PASS: people empty/<1 treated as 1 (perPerson == total)
CHECK PASS: negative bill/tip clamped to 0
CHECK PASS: no uncaught JS errors on empty inputs
score: 8/8 (100%)
produced code
index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tip Calculator</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background-color: #f4f7f6;
        }
        .calculator-card {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 1.5rem;
        }
        .input-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            color: #666;
            font-size: 0.9rem;
        }
        input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 1rem;
        }
        button {
            width: 100%;
            padding: 12px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background 0.2s;
            margin-top: 1rem;
        }
        button:hover {
            background-color: #0056b3;
        }
        .results {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #eee;
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
        }
        .result-value {
            font-weight: bold;
            color: #333;
        }
    </style>
</head>
<body>

    <div class="calculator-card">
        <h1>Tip Calculator</h1>
        
        <div class="input-group">
            <label for="bill">Bill Amount</label>
            <input type="number" id="bill" placeholder="0.00" step="0.01">
        </div>
        
        <div class="input-group">
            <label for="tip">Tip Percentage (%)</label>
            <input type="number" id="tip" placeholder="15" step="1">
        </div>
        
        <div class="input-group">
            <label for="people">Number of People</label>
            <input type="number" id="people" placeholder="1" step="1">
        </div>
        
        <button id="calculate">Calculate</button>
        
        <div class="results">
            <div class="result-item">
                <span>Total Bill:</span>
                <span id="total" class="result-value">$0.00</span>
            </div>
            <div class="result-item">
                <span>Each Person Pays:</span>
                <span id="perPerson" class="result-value">$0.00</span>
            </div>
        </div>
    </div>

    <script>
        document.getElementById('calculate').addEventListener('click', function() {
            // Get input values
            const billInput = document.getElementById('bill').value;
            const tipInput = document.getElementById('tip').value;
            const peopleInput = document.getElementById('people').value;

            // Parse and Clamp Bill
            let bill = parseFloat(billInput);
            if (isNaN(bill) || bill < 0) {
                bill = 0;
            }

            // Parse and Clamp Tip
            let tipPercent = parseFloat(tipInput);
            if (isNaN(tipPercent) || tipPercent < 0) {
                tipPercent = 0;
            }

            // Parse and Clamp People
            let people = parseInt(peopleInput, 10);
            if (isNaN(people) || people < 1) {
                people = 1;
            }

            // Calculations
            const tipAmount = bill * (tipPercent / 100);
            const total = bill + tipAmount;
            const perPerson = total / people;

            // Display results formatted to 2 decimal places
            document.getElementById('total').textContent = '$' + total.toFixed(2);
            document.getElementById('perPerson').textContent = '$' + perPerson.toFixed(2);
        });
    </script>
</body>
</html>

rep 2 PASS

pi 134.9s · verify 8.4s · 6347 tok · responded: google/gemma-4-31b-it · transcript

screenshot

verify output
CHECK PASS: required elements exist
CHECK PASS: total: bill=100 tip=20 -> 120.00
CHECK PASS: total: bill=50 tip=10 -> 55.00
CHECK PASS: two-decimal formatting
CHECK PASS: split: bill=100 tip=15 people=3 -> total 115.00, perPerson 38.33
CHECK PASS: people empty/<1 treated as 1 (perPerson == total)
CHECK PASS: negative bill/tip clamped to 0
CHECK PASS: no uncaught JS errors on empty inputs
score: 8/8 (100%)
produced code
index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tip Calculator</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background-color: #f4f7f6;
        }
        .card {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 1.5rem;
        }
        .input-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            color: #666;
            font-weight: 500;
        }
        input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 1rem;
        }
        button {
            width: 100%;
            padding: 12px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s;
            margin-top: 1rem;
        }
        button:hover {
            background-color: #0056b3;
        }
        .results {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #eee;
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
        }
        .result-value {
            font-weight: bold;
            color: #333;
        }
    </style>
</head>
<body>

    <div class="card">
        <h1>Tip Calculator</h1>
        
        <div class="input-group">
            <label for="bill">Bill Amount</label>
            <input type="number" id="bill" placeholder="0.00" step="0.01">
        </div>
        
        <div class="input-group">
            <label for="tip">Tip Percentage (%)</label>
            <input type="number" id="tip" placeholder="15" step="1">
        </div>
        
        <div class="input-group">
            <label for="people">Number of People</label>
            <input type="number" id="people" placeholder="1" step="1">
        </div>
        
        <button id="calculate">Calculate</button>
        
        <div class="results">
            <div class="result-item">
                <span>Total:</span>
                <span id="total" class="result-value">$0.00</span>
            </div>
            <div class="result-item">
                <span>Each Person:</span>
                <span id="perPerson" class="result-value">$0.00</span>
            </div>
        </div>
    </div>

    <script>
        document.getElementById('calculate').addEventListener('click', function() {
            // Get input values
            const billInput = document.getElementById('bill').value;
            const tipInput = document.getElementById('tip').value;
            const peopleInput = document.getElementById('people').value;

            // Parse and clamp values
            let bill = parseFloat(billInput);
            if (isNaN(bill) || bill < 0) bill = 0;

            let tipPercent = parseFloat(tipInput);
            if (isNaN(tipPercent) || tipPercent < 0) tipPercent = 0;

            let people = parseInt(peopleInput, 10);
            if (isNaN(people) || people < 1) people = 1;

            // Calculations
            const total = bill + (bill * (tipPercent / 100));
            const perPerson = total / people;

            // Formatting (using locale string for thousands separator and fixed 2 decimals)
            const formatCurrency = (val) => {
                return '$' + val.toLocaleString(undefined, { 
                    minimumFractionDigits: 2, 
                    maximumFractionDigits: 2 
                });
            };

            // Update UI
            document.getElementById('total').textContent = formatCurrency(total);
            document.getElementById('perPerson').textContent = formatCurrency(perPerson);
        });
    </script>
</body>
</html>

rep 3 PASS

pi 13.0s · verify 8.4s · 6165 tok · responded: google/gemma-4-31b-it · transcript

screenshot

verify output
CHECK PASS: required elements exist
CHECK PASS: total: bill=100 tip=20 -> 120.00
CHECK PASS: total: bill=50 tip=10 -> 55.00
CHECK PASS: two-decimal formatting
CHECK PASS: split: bill=100 tip=15 people=3 -> total 115.00, perPerson 38.33
CHECK PASS: people empty/<1 treated as 1 (perPerson == total)
CHECK PASS: negative bill/tip clamped to 0
CHECK PASS: no uncaught JS errors on empty inputs
score: 8/8 (100%)
produced code
index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tip Calculator</title>
    <style>
        body {
            font-family: system-ui, -apple-system, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background-color: #f4f7f6;
        }
        .card {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        h1 {
            text-align: center;
            color: #333;
            margin-top: 0;
        }
        .input-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: #666;
        }
        input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 1rem;
        }
        button {
            width: 100%;
            padding: 0.75rem;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 1rem;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        button:hover {
            background-color: #0056b3;
        }
        .results {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #eee;
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
        }
        .result-value {
            font-weight: bold;
            color: #333;
        }
    </style>
</head>
<body>

<div class="card">
    <h1>Tip Calculator</h1>
    
    <div class="input-group">
        <label for="bill">Bill Amount</label>
        <input type="number" id="bill" step="0.01" placeholder="0.00">
    </div>
    
    <div class="input-group">
        <label for="tip">Tip Percentage (%)</label>
        <input type="number" id="tip" step="1" placeholder="15">
    </div>
    
    <div class="input-group">
        <label for="people">Number of People</label>
        <input type="number" id="people" step="1" placeholder="1">
    </div>
    
    <button id="calculate">Calculate</button>
    
    <div class="results">
        <div class="result-item">
            <span>Total Bill:</span>
            <span id="total" class="result-value">$0.00</span>
        </div>
        <div class="result-item">
            <span>Each Person:</span>
            <span id="perPerson" class="result-value">$0.00</span>
        </div>
    </div>
</div>

<script>
    document.getElementById('calculate').addEventListener('click', function() {
        // Get values
        const billInput = document.getElementById('bill').value;
        const tipInput = document.getElementById('tip').value;
        const peopleInput = document.getElementById('people').value;

        // Parse and clamp bill/tip
        let bill = parseFloat(billInput) || 0;
        if (bill < 0) bill = 0;

        let tipPercent = parseFloat(tipInput) || 0;
        if (tipPercent < 0) tipPercent = 0;

        // Parse and clamp people
        let people = parseInt(peopleInput, 10) || 1;
        if (people < 1) people = 1;

        // Calculations
        const total = bill + (bill * (tipPercent / 100));
        const perPerson = total / people;

        // Format as currency
        const formatter = new Intl.NumberFormat('en-US', {
            style: 'currency',
            currency: 'USD',
            minimumFractionDigits: 2,
            maximumFractionDigits: 2
        });

        // Display results
        document.getElementById('total').textContent = formatter.format(total);
        document.getElementById('perPerson').textContent = formatter.format(perPerson);
    });
</script>

</body>
</html>

rep 4 PASS

pi 137.6s · verify 8.4s · 6450 tok · responded: google/gemma-4-31b-it · transcript

screenshot

verify output
CHECK PASS: required elements exist
CHECK PASS: total: bill=100 tip=20 -> 120.00
CHECK PASS: total: bill=50 tip=10 -> 55.00
CHECK PASS: two-decimal formatting
CHECK PASS: split: bill=100 tip=15 people=3 -> total 115.00, perPerson 38.33
CHECK PASS: people empty/<1 treated as 1 (perPerson == total)
CHECK PASS: negative bill/tip clamped to 0
CHECK PASS: no uncaught JS errors on empty inputs
score: 8/8 (100%)
produced code
index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tip Calculator</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background-color: #f4f7f6;
        }
        .container {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        h1 {
            text-align: center;
            color: #333;
            margin-bottom: 1.5rem;
        }
        .input-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: #666;
        }
        input {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid #ddd;
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 1rem;
        }
        button {
            width: 100%;
            padding: 1rem;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 1.1rem;
            cursor: pointer;
            transition: background-color 0.2s;
            margin-top: 1rem;
        }
        button:hover {
            background-color: #0056b3;
        }
        .results {
            margin-top: 2rem;
            padding-top: 1rem;
            border-top: 2px solid #f4f7f6;
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 1.2rem;
        }
        .result-value {
            font-weight: bold;
            color: #333;
        }
    </style>
</head>
<body>

<div class="container">
    <h1>Tip Calculator</h1>
    
    <div class="input-group">
        <label for="bill">Bill Amount</label>
        <input type="number" id="bill" placeholder="0.00" step="0.01">
    </div>
    
    <div class="input-group">
        <label for="tip">Tip Percentage (%)</label>
        <input type="number" id="tip" placeholder="15" step="1">
    </div>
    
    <div class="input-group">
        <label for="people">Number of People</label>
        <input type="number" id="people" placeholder="1" step="1">
    </div>
    
    <button id="calculate">Calculate</button>
    
    <div class="results">
        <div class="result-item">
            <span>Total Bill:</span>
            <span id="total" class="result-value">$0.00</span>
        </div>
        <div class="result-item">
            <span>Each Person Pays:</span>
            <span id="perPerson" class="result-value">$0.00</span>
        </div>
    </div>
</div>

<script>
    document.getElementById('calculate').addEventListener('click', function() {
        // Get inputs
        let billVal = parseFloat(document.getElementById('bill').value);
        let tipVal = parseFloat(document.getElementById('tip').value);
        let peopleVal = parseInt(document.getElementById('people').value, 10);

        // Input handling: Empty or non-numeric is treated as 0
        // Clamp negatives to 0
        if (isNaN(billVal) || billVal < 0) billVal = 0;
        if (isNaN(tipVal) || tipVal < 0) tipVal = 0;

        // Input handling: Empty or < 1 treated as 1
        if (isNaN(peopleVal) || peopleVal < 1) peopleVal = 1;

        // Compute total = bill + bill * (tip / 100)
        const total = billVal + (billVal * (tipVal / 100));
        
        // Compute perPerson = total / people
        const perPerson = total / peopleVal;

        // Format to 2 decimal places
        const formatter = new Intl.NumberFormat('en-US', {
            style: 'currency',
            currency: 'USD',
            minimumFractionDigits: 2,
            maximumFractionDigits: 2
        });

        document.getElementById('total').textContent = formatter.format(total);
        document.getElementById('perPerson').textContent = formatter.format(perPerson);
    });
</script>

</body>
</html>

rep 5 PASS

pi 107.6s · verify 8.3s · 6270 tok · responded: google/gemma-4-31b-it · transcript

screenshot

verify output
CHECK PASS: required elements exist
CHECK PASS: total: bill=100 tip=20 -> 120.00
CHECK PASS: total: bill=50 tip=10 -> 55.00
CHECK PASS: two-decimal formatting
CHECK PASS: split: bill=100 tip=15 people=3 -> total 115.00, perPerson 38.33
CHECK PASS: people empty/<1 treated as 1 (perPerson == total)
CHECK PASS: negative bill/tip clamped to 0
CHECK PASS: no uncaught JS errors on empty inputs
score: 8/8 (100%)
produced code
index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tip Calculator</title>
    <style>
        body {
            font-family: system-ui, -apple-system, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            background-color: #f0f2f5;
        }
        .card {
            background: white;
            padding: 2rem;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
        }
        h1 {
            margin-top: 0;
            text-align: center;
            color: #1a1a1a;
        }
        .input-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: #444;
        }
        input {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid #ccc;
            border-radius: 6px;
            box-sizing: border-box;
            font-size: 1rem;
        }
        button {
            width: 100%;
            padding: 0.75rem;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: background-color 0.2s;
        }
        button:hover {
            background-color: #0056b3;
        }
        .results {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid #eee;
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
        }
        .result-value {
            font-weight: bold;
            color: #007bff;
        }
    </style>
</head>
<body>

    <div class="card">
        <h1>Tip Calculator</h1>
        
        <div class="input-group">
            <label for="bill">Bill Amount</label>
            <input type="number" id="bill" placeholder="0.00" step="0.01">
        </div>
        
        <div class="input-group">
            <label for="tip">Tip Percentage (%)</label>
            <input type="number" id="tip" placeholder="15" step="1">
        </div>
        
        <div class="input-group">
            <label for="people">Number of People</label>
            <input type="number" id="people" placeholder="1" step="1">
        </div>
        
        <button id="calculate">Calculate</button>
        
        <div class="results">
            <div class="result-item">
                <span>Total Bill:</span>
                <span id="total" class="result-value">$0.00</span>
            </div>
            <div class="result-item">
                <span>Amount Per Person:</span>
                <span id="perPerson" class="result-value">$0.00</span>
            </div>
        </div>
    </div>

    <script>
        document.getElementById('calculate').addEventListener('click', () => {
            // Get input values
            const billInput = document.getElementById('bill').value;
            const tipInput = document.getElementById('tip').value;
            const peopleInput = document.getElementById('people').value;

            // Parse and clamp Bill
            let bill = parseFloat(billInput);
            if (isNaN(bill) || bill < 0) {
                bill = 0;
            }

            // Parse and clamp Tip
            let tipPercent = parseFloat(tipInput);
            if (isNaN(tipPercent) || tipPercent < 0) {
                tipPercent = 0;
            }

            // Parse and clamp People
            let people = parseInt(peopleInput, 10);
            if (isNaN(people) || people < 1) {
                people = 1;
            }

            // Computations
            const total = bill + (bill * (tipPercent / 100));
            const perPerson = total / people;

            // Display results formatted to 2 decimal places
            document.getElementById('total').textContent = '$' + total.toFixed(2);
            document.getElementById('perPerson').textContent = '$' + perPerson.toFixed(2);
        });
    </script>
</body>
</html>