Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Presentation.pptx
Binary file not shown.
Binary file added Preview Video.mp4
Binary file not shown.
49 changes: 49 additions & 0 deletions Project 1 - Sign Up Page - Easy/signupl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}

.container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
width: 300px;
}

form {
display: flex;
flex-direction: column;
}

label {
margin-bottom: 5px;
text-align: left;
}

input {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}

button {
padding: 10px 20px;
font-size: 16px;
color: white;
background-color: #007BFF;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #0056b3;
}
31 changes: 31 additions & 0 deletions Project 1 - Sign Up Page - Easy/signupl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<link rel="stylesheet" href="signupl.css">
</head>
<body>
<div class="container">
<h1>Sign Up</h1>
<form action="/submit_form" method="post">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>

<label for="email">Email</label>
<input type="email" id="email" name="email" required>

<label for="password">Password</label>
<input type="password" id="password" name="password" required>

<label for="confirm-password">Confirm Password</label>
<input type="password" id="confirm-password" name="confirm-password" required>

<button type="submit">Sign Up</button>
</form>
</div>
</body>
</html>

<script src="signupl.js"></script>
19 changes: 19 additions & 0 deletions Project 1 - Sign Up Page - Easy/signupl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
document.getElementById('signupForm').addEventListener('submit', function(event) {
event.preventDefault();

const username = document.getElementById('username').value;
const email = document.getElementById('email').value;
const password = document.getElementById('password').value;
const confirmPassword = document.getElementById('confirm-password').value;
const message = document.getElementById('message');


if (password !== confirmPassword) {
message.style.color = 'red';
message.innerText = 'Passwords do not match!';
} else {
message.style.color = 'green';
message.innerText = 'Sign Up Successful!';

}
});
40 changes: 40 additions & 0 deletions Project 2 - Tic Tac Toe - Intermediate/tictactoe.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
margin: 0;
}

.container {
text-align: center;
}

.board {
display: grid;
grid-template-columns: repeat(3, 100px);
grid-template-rows: repeat(3, 100px);
gap: 5px;
margin-bottom: 20px;
}

.cell {
display: flex;
justify-content: center;
align-items: center;
width: 100px;
height: 100px;
font-size: 24px;
font-weight: bold;
background-color:blue;
border: 1px solid #ccc;
cursor: pointer;
}

button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}
27 changes: 27 additions & 0 deletions Project 2 - Tic Tac Toe - Intermediate/tictactoe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tic Tac Toe</title>
<link rel="stylesheet" href="tictactoe.css">
</head>
<body>
<div class="container">
<h1>Tic Tac Toe</h1>
<div class="board">
<div class="cell" id="cell-0" onclick="makeMove(0)"></div>
<div class="cell" id="cell-1" onclick="makeMove(1)"></div>
<div class="cell" id="cell-2" onclick="makeMove(2)"></div>
<div class="cell" id="cell-3" onclick="makeMove(3)"></div>
<div class="cell" id="cell-4" onclick="makeMove(4)"></div>
<div class="cell" id="cell-5" onclick="makeMove(5)"></div>
<div class="cell" id="cell-6" onclick="makeMove(6)"></div>
<div class="cell" id="cell-7" onclick="makeMove(7)"></div>
<div class="cell" id="cell-8" onclick="makeMove(8)"></div>
</div>
<button onclick="resetGame()">Restart Game</button>
</div>
<script src="tictactoe.js"></script>
</body>
</html>
46 changes: 46 additions & 0 deletions Project 2 - Tic Tac Toe - Intermediate/tictactoe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
let board = ["", "", "", "", "", "", "", "", ""];
let currentPlayer = "X";
let gameActive = true;

const winningConditions = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8],
[0, 3, 6],
[1, 4, 7],
[2, 5, 8],
[0, 4, 8],
[2, 4, 6]
];

function makeMove(index) {
if (board[index] === "" && gameActive) {
board[index] = currentPlayer;
document.getElementById(`cell-${index}`).innerText = currentPlayer;
checkWinner();
currentPlayer = currentPlayer === "X" ? "O" : "X";
}
}

function checkWinner() {
for (let i = 0; i < winningConditions.length; i++) {
const [a, b, c] = winningConditions[i];
if (board[a] && board[a] === board[b] && board[a] === board[c]) {
alert(`${board[a]} has won!`);
gameActive = false;
return;
}
}

if (!board.includes("")) {
alert("It's a tie!");
gameActive = false;
}
}

function resetGame() {
board = ["", "", "", "", "", "", "", "", ""];
currentPlayer = "X";
gameActive = true;
document.querySelectorAll(".cell").forEach(cell => cell.innerText = "");
}
Binary file added Report.pdf
Binary file not shown.