CSS_microproject_pranjal_self[1] fin
CSS_microproject_pranjal_self[1] fin
8 Presentation
9 Viva
1
MAHARASHTRA STATE BOARD OF
TECHNICAL EDUCATION
MICRO PROJECT
Academic year 2024-25
TITLE OF PROJECT
2
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify Waghchaure Pranjal Sambhaji of 5th Semester of Diploma in Computer
Technology of Institute, SNJB's Shri Hiralal Hastimal (Jain Brothers, Jalgaon)
Polytechnic, Chandwad) (Code: 0079) has completed the Micro-Project satisfactorily in Subject
Client Side Scripting Language (22519) for the academic year 2024- 2025 as prescribed in the
curriculum.
Place: CHANDWAD
Date: / /2024
3
INDEX
SR_NO
CONTENT PAGE NO.
.
Part A
Part B
4
PART A-Plan
5
4.0Action Plan:
5.0Resources Required-
1.0Brief Description:
JavaScript is a scripting or programming language that allows you to implement
complex features on web pages. Every time a web page does more than just sit there
and display static information for you to look at. Displaying timely content updates,
interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc.We have
made a maths game, this can improve other brain functions, such as attention,
concentration, and focus. It helps the users in practicing Math. It is a Learn And Fun
Game. It can be used by any Age-Groups. Math games give space to critical thinking
and that helps children nurture their attention to detail while solving it. Math games
can improve visual recognition as well as help in investing leisure time in something
quite useful.
Algorithm:
Step 1. Start
Step 2. Create HTML structure by adding the 4 boxes, scoreboard and reset button.
Step 8. If user wants to play again or if user clicks reset button in between, Go to step 4.
Step 9. Stop.
Flowchart
Source Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Math Game</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
}
#container {
width: 600px;
margin: 50px auto;
text-align: center;
background: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgb(0, 255, 47);
}
.box {
display: inline-block;
width: 120px;
height: 120px;
margin: 10px;
background-color: #f0f0f0;
border: 2px solid #ccc;
border-radius: 5px;
line-height: 120px;
font-size: 24px;
cursor: pointer;
}
.text-center {
text-align: center;
}
#startreset {
background-color: #007bff;
color: white;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
}
#startreset:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<div id="container">
<div id="score">Score: <span id="scoreValue">0</span></div>
<div id="correct">Correct!</div>
<div id="wrong">Try Again!</div>
<div id="question" class="text-center"></div>
<div id="information" class="text-center">Click on the correct answer!</div>
<div id="choices">
<div id="box1" class="box text-center"></div>
<div id="box2" class="box text-center"></div>
<div id="box3" class="box text-center"></div>
<div id="box4" class="box text-center"></div>
</div>
<div id="startreset" class="text-center">Start Game</div>
<div id="timeremaining" class="text-center">Time Remaining: <span id="timeremainingValue">60</span></div>
<div id="gameover" class="text-center"></div>
</div>
<script>
// Global Variables
var playing = false;
var score;
var timeremaining;
var countdown;
var correctAns;
// Register Events
document.getElementById("startreset").addEventListener("click", play);
document.getElementById("box1").addEventListener("click", checkAnswer);
document.getElementById("box2").addEventListener("click", checkAnswer);
document.getElementById("box3").addEventListener("click", checkAnswer);
document.getElementById("box4").addEventListener("click", checkAnswer);
function play(e) {
if (playing === true) {
// Reset the game
window.location.reload();
} else {
// Start the game
playing = true;
this.innerHTML = "Reset Game";
score = 0;
setText("scoreValue", score);
hide("gameover");
timeremaining = 60;
setText("timeremainingValue", timeremaining);
show("timeremaining");
startCountdown();
generateQA();
}
}
function generateQA() {
var x = (1 + Math.round(Math.random() * 9));
var y = (1 + Math.round(Math.random() * 9));
correctAns = x * y;
let quesString = `${x} x ${y}`;
setText("question", quesString);
setText("box" + i, wrongAns);
answers.push(wrongAns);
}
}
}
function checkAnswer() {
if (playing === true) {
if (this.innerHTML == correctAns) {
score++;
setText("scoreValue", score);
show("correct");
hide("wrong");
setTimeout(function () {
hide("correct");
}, 500);
generateQA();
} else {
show("wrong");
hide("correct");
setTimeout(function () {
hide("wrong");
}, 500);
}
}
}
function startCountdown() {
countdown = setInterval(function () {
timeremaining -= 1;
setText("timeremainingValue", timeremaining);
if (timeremaining <= 0) {
clearInterval(countdown);
playing = false;
show("gameover");
hide("timeremaining");
function show(id) {
document.getElementById(id).style.display = 'block';
}
function hide(id) {
document.getElementById(id).style.display = 'none';
}
</script>
</body>
</html>
5.0 Output of the Micro-
Project:
Step1:
Step2:
Step3:
1. Math games can improve visual recognition and can be used as Math Test/ Quiz.
2. With many Math games based on calculating easy to tough levels of math
problems, children improve their visual discrimination.
3. It improves other brain functions, such as attention, concentration, and focus.
4. It is very user-friendly, Interactive UI and UX and A Fun & Learn Game.
5. These games improve visual memory, sustained attention, and visual recognition
skills.