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
19 changes: 11 additions & 8 deletions Training/CSS-Practice/practice-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,24 @@
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: 0;
display: flex;
justify-content:center;
align-items: center;
/*height: ; */
}

.container {
background-color: #fff;
margin-top: 50px;
padding: 20px;
/* TASK 2: CREATE YOUR OWN CURVED BORDER */
/* border: ;
border-radius: ; */
border: 1px solid;
border-radius: 6px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
color:#a00;
transition: background-color 0.5s;
}

h1 {
Expand Down
8 changes: 6 additions & 2 deletions Training/JS-Practice/factorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ <h1>Factorial Calculator</h1>
const result = document.getElementById("result");

const calculateFactorial = (number) => {
// TASK: CREATE YOUR FACTORIAL CALCULATION LOGIC HERE
if (number == 0 || number == 1) {
return 1;
} else {
return number * calculateFactorial(number - 1);
}
};

calculateButton.addEventListener("click", () => {
const inputValue = parseInt(numberInput.value);

if (!isNaN(inputValue)) {
if (!isNaN(inputValue) || inputValue > 0) {
const factorialResult = calculateFactorial(inputValue);
result.textContent = `Factorial: ${factorialResult}`;
} else {
Expand Down
2 changes: 1 addition & 1 deletion Training/JS-Practice/rectangle.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>Rectangle Area Calculator</h1>
const result = document.getElementById("result");

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

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