BCA Student Stories & UpdatesLive
Sprint 3 Capstone: Interactive Student SGPA & Grade Portal
This Sprint 3 Capstone integrates everything learned across Days 21–29 into a complete, interactive Single Page Application. Students build a real-world University Grade & SGPA Evaluation Portal that accepts subject marks, performs calculations, and renders professional report cards dynamically.
Day 30 Step-by-Step Practical Flow
🎯1. What You Will Learn Today
Sprint 3 Capstone: Interactive Student SGPA & Grade Portal — Comprehensive Practical Guide
Har concept ko visual mental models, code anatomy aur practical industry tips ke sath samjhein.
This Sprint 3 Capstone integrates everything learned across Days 21–29 into a complete, interactive Single Page Application. Students build a real-world University Grade & SGPA Evaluation Portal that accepts subject marks, performs calculations, and renders professional report cards dynamically.
"Think of this project like the official IGNOU or Delhi University Grade Card web portal: students enter their marks, and the web app automatically computes credits, SGPA, grades, and displays their official term results."
👨🏫3. Teacher Demonstration Code
Study how the HTML form connects to JavaScript calculation logic and updates the DOM dynamically.
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: 'Segoe UI', sans-serif; background: #060c18; color: #fff; padding: 24px; }
.card { background: #0c1328; border: 1px solid #1e293b; padding: 24px; border-radius: 12px; max-width: 500px; margin: auto; }
input { width: 100%; padding: 10px; margin: 8px 0; background: #060c18; border: 1px solid #334155; color: #fff; border-radius: 6px; box-sizing: border-box; }
button { width: 100%; padding: 12px; background: #2563eb; color: #fff; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; margin-top: 10px; }
.result-box { margin-top: 20px; padding: 16px; border-radius: 8px; background: #1e293b; display: none; }
.badge-pass { color: #10b981; font-weight: bold; }
.badge-fail { color: #ef4444; font-weight: bold; }
</style>
</head>
<body>
<div class="card">
<h2>🎓 BCA Grade Calculator</h2>
<form id="grade-form">
<input type="number" id="sub1" placeholder="BCS-011 Computer Basics Marks" required min="0" max="100" />
<input type="number" id="sub2" placeholder="BCSL-013 Lab Practical Marks" required min="0" max="100" />
<button type="submit">Calculate Grade</button>
</form>
<div id="results" class="result-box"></div>
</div>
<script>
const form = document.querySelector("#grade-form");
const results = document.querySelector("#results");
form.addEventListener("submit", (e) => {
e.preventDefault();
const m1 = Number(document.querySelector("#sub1").value);
const m2 = Number(document.querySelector("#sub2").value);
const total = m1 + m2;
const percentage = (total / 200) * 100;
const sgpa = (percentage / 9.5).toFixed(2);
const isPass = m1 >= 40 && m2 >= 40;
results.style.display = "block";
results.innerHTML = "<h4>Performance Summary</h4>" +
"<p>Total Marks: <strong>" + total + " / 200</strong></p>" +
"<p>Percentage: <strong>" + percentage.toFixed(1) + "%</strong></p>" +
"<p>Estimated SGPA: <strong>" + sgpa + "</strong></p>" +
"<p>Status: <span class='" + (isPass ? "badge-pass" : "badge-fail") + "'>" + (isPass ? "PASS ✅" : "FAIL ❌") + "</span></p>";
});
</script>
</body>
</html>2. Hands-On Practical Lab: Follow Instructions in VS Code
Code like a professional software engineer! Follow the step-by-step instructions below in Visual Studio Code (VS Code) on your PC, test your output locally, and push to GitHub.
Day 30 Practical Task Test Studio
In the form submit listener, preventDefault and calculate const total = Number(document.querySelector("#m1").value) + Number(document.querySelector("#m2").value); and const pct = (total / 200) * 100;
Set outputBox.style.display = "block" and inject total and percentage into outputBox.innerHTML.
Spot the Bug: String Concatenation Trap in User Inputs
Tap or click on the exact line below that contains the error:
Click any code lineconst score1 = document.querySelector("#s1").value; // e.g. "80"const score2 = document.querySelector("#s2").value; // e.g. "90" const total = score1 + score2;console.log("Total Score:", total); // Prints: "8090" instead of 170!Senior Developer Forensic Analysis:
Values read from HTML <input> elements are always strings. Using + concatenates "80" and "90" into "8090" instead of adding numbers.
📝Independent Practice: Assignment
📄 sgpa-portal.htmlProduction BCA SGPA & Semester Transcript Portal
- •Create day-30/index.html and day-30/styles.css.
- •Support 4 BCA 1st Semester subjects: Computer Basics, PC Software Lab, Math, and Communication.
- •Compute overall SGPA, Division (Distinction / 1st / 2nd / Fail), and percentage.
- •Style with a sleek dark theme (#060c18 background, #0c1328 cards, blue buttons).
- •Deploy to GitHub Pages or Firebase and verify all interactions run smoothly.
Open Visual Studio Code on your PC (code .), create sgpa-portal.html, paste this complete step-by-step verified code, test in your browser, and push to your GitHub repo:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BCA Day 30 - Production SGPA & Semester Transcript Portal</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: 'Segoe UI', Tahoma, sans-serif;
background: #060c18;
color: white;
min-height: 100vh;
padding: 32px 16px;
}
.portal-card {
max-width: 640px;
margin: 0 auto;
background: #0c1328;
border: 1px solid #1e293b;
border-radius: 20px;
padding: 32px;
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}
h1 { font-size: 22px; color: #38bdf8; margin-bottom: 6px; }
.sub { font-size: 13px; color: #94a3b8; margin-bottom: 24px; }
.subject-row {
display: flex;
justify-content: space-between;
align-items: center;
background: #070d1e;
border: 1px solid #1e293b;
padding: 12px 16px;
border-radius: 10px;
margin-bottom: 10px;
}
.subject-info div { font-size: 13px; font-weight: bold; }
.subject-info span { font-size: 11px; color: #64748b; }
input[type="number"] {
width: 80px;
padding: 8px;
background: #0c1328;
border: 1px solid #334155;
border-radius: 6px;
color: white;
text-align: center;
font-size: 14px;
outline: none;
}
input[type="number"]:focus { border-color: #2563eb; }
.btn-calc {
width: 100%;
padding: 14px;
background: #2563eb;
color: white;
border: none;
border-radius: 10px;
font-weight: 800;
font-size: 14px;
cursor: pointer;
margin-top: 16px;
transition: background 0.2s ease;
}
.btn-calc:hover { background: #1d4ed8; }
.result-sheet {
margin-top: 24px;
padding: 20px;
background: #070d1e;
border: 1px dashed #2563eb;
border-radius: 12px;
display: none;
}
.score-badge { font-size: 24px; font-weight: 800; color: #34d399; }
.division-text { font-size: 14px; color: #38bdf8; font-weight: bold; margin-top: 4px; }
</style>
</head>
<body>
<div class="portal-card">
<h1>BCA Semester 1 SGPA Calculator</h1>
<p class="sub">Sprint 3 Capstone • 4 Core Subjects with Real-time Grade Evaluation</p>
<div class="subject-row">
<div class="subject-info">
<div>BCS-011: Computer Basics</div>
<span>3 Credits</span>
</div>
<input type="number" id="m1" value="78" min="0" max="100">
</div>
<div class="subject-row">
<div class="subject-info">
<div>BCSL-013: PC Software Lab</div>
<span>2 Credits</span>
</div>
<input type="number" id="m2" value="85" min="0" max="100">
</div>
<div class="subject-row">
<div class="subject-info">
<div>BCS-012: Mathematics</div>
<span>4 Credits</span>
</div>
<input type="number" id="m3" value="70" min="0" max="100">
</div>
<div class="subject-row">
<div class="subject-info">
<div>FEG-02: Communication Skills</div>
<span>3 Credits</span>
</div>
<input type="number" id="m4" value="75" min="0" max="100">
</div>
<button class="btn-calc" onclick="calculateTranscript()">Calculate SGPA & Transcript</button>
<div class="result-sheet" id="resultSheet">
<div class="score-badge" id="sgpaVal">--</div>
<div class="division-text" id="divVal">--</div>
<div style="font-size: 12px; color: #94a3b8; margin-top: 8px;" id="breakdownVal">--</div>
</div>
</div>
<script>
function calculateTranscript() {
const s1 = parseFloat(document.getElementById("m1").value) || 0;
const s2 = parseFloat(document.getElementById("m2").value) || 0;
const s3 = parseFloat(document.getElementById("m3").value) || 0;
const s4 = parseFloat(document.getElementById("m4").value) || 0;
const credits = [3, 2, 4, 3];
const marks = [s1, s2, s3, s4];
const totalCredits = 12;
let totalWeightedScore = 0;
let rawTotal = 0;
for (let i = 0; i < 4; i++) {
rawTotal += marks[i];
totalWeightedScore += marks[i] * credits[i];
}
const percentage = (rawTotal / 400 * 100).toFixed(1);
const sgpa = (totalWeightedScore / (totalCredits * 10)).toFixed(2);
let division = "Fail";
if (percentage >= 75) division = "First Division with Distinction 🌟";
else if (percentage >= 60) division = "First Division";
else if (percentage >= 50) division = "Second Division";
else if (percentage >= 40) division = "Pass";
document.getElementById("sgpaVal").textContent = `SGPA: ${sgpa} / 10.0`;
document.getElementById("divVal").textContent = `Award: ${division}`;
document.getElementById("breakdownVal").textContent =
`Total Marks: ${rawTotal}/400 (${percentage}%) • Total Credits: ${totalCredits}`;
document.getElementById("resultSheet").style.display = "block";
}
</script>
</body>
</html>🎓4. Viva Check: Mandatory Conceptual Test
Why does adding two <input> values directly (inputA.value + inputB.value) often result in unexpected outputs like "5060" instead of 110?
5. Mandatory Step: Push to GitHub to Unlock Next Lesson
Target Repo: html-css-projects
Exact GitHub Setup Guide & Expected Structure
Day 30 RequirementsFollow these exact folder and file names to prevent verification errors.
index.html: Avoid spaces or custom names like Alan Turing..html or Index.HTML. Linux/GitHub servers are strictly case-sensitive.day-30/ for today so you don't overwrite previous days.main.You are welcome to read all notes, inspect code snippets, and practice all exercises of Day 30 freely! To officially submit your GitHub repository and unlock subsequent days in your portfolio, please complete Day 29: DOM Events: addEventListener, Click, Input & Form Submission with preventDefault first.
Complete Day 29 First