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
16 changes: 8 additions & 8 deletions Training/CSS-Practice/practice-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
font-family: Arial, sans-serif;
background-color: #f0f0f0;
/* TASK 1: PLACE THE ITEMS IN THE CENTRE OF THE WEBPAGE */
/* margin: ;
padding: ;
display: ;
justify-content: ;
align-items: ;
height: ; */
/* margin: 0; */
/* padding: 20; */
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.container {
background-color: #fff;
padding: 20px;
/* TASK 2: CREATE YOUR OWN CURVED BORDER */
/* border: ;
border-radius: ; */
border: solid;
border-radius: 5mm;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

Expand Down
10 changes: 9 additions & 1 deletion Training/Counter/counter.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,22 @@
<h1>Click Counter</h1>
<button id="clickButton">Click me!</button>
<p id="counter">Click count: 0</p>
<button id="resetButton">reset!</button>

<script>
// JavaScript functionality
const clickButton = document.getElementById("clickButton");
const resetButton = document.getElementById("resetButton");
const counter = document.getElementById("counter");
let count = 0;

clickButton.addEventListener("click", () => {
// counter.textContent = `Click count: ${}`;
count += 1;
counter.textContent = `Click count: ${count}`;
});
resetButton.addEventListener("click", () => {
count = 0;
counter.textContent = `Click count: ${count}`;
});
</script>
</body>
Expand Down
5 changes: 5 additions & 0 deletions Training/JS-Practice/factorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ <h1>Factorial Calculator</h1>

const calculateFactorial = (number) => {
// TASK: CREATE YOUR FACTORIAL CALCULATION LOGIC HERE
let factorial = 1;
for (let i = number; i > 0; i -= 1) {
factorial *= i;
}
return factorial;
};

calculateButton.addEventListener("click", () => {
Expand Down
1 change: 1 addition & 0 deletions Training/JS-Practice/rectangle.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ <h1>Rectangle Area Calculator</h1>

const calculateRectangleArea = (length, width) => {
// TASK: CREATE YOUR AREA CALCULATION LOGIC HERE
return length*width;
};

calculateButton.addEventListener("click", () => {
Expand Down