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 Screen Recording 2024-10-29 213028.mp4
Binary file not shown.
Binary file added Screen Recording 2024-10-29 213409.mp4
Binary file not shown.
45 changes: 45 additions & 0 deletions calculator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Calculator</title>
</head>
<body>
<div class="calculator">
<input type="text" placeholder="0" id="inputContainer">
<div>
<button class="oprtr">AC</button>
<button class="oprtr">DEL</button>
<button class="oprtr">%</button>
<button class="operator">/</button>
</div>
<div>
<button>7</button>
<button>8</button>
<button>9</button>
<button class="operator">*</button>
</div>
<div>
<button>4</button>
<button>5</button>
<button>6</button>
<button class="operator">- </button>
</div>
<div>
<button>1</button>
<button>2</button>
<button>3</button>
<button class="operator">+</button>
</div>
<div>
<button>00</button>
<button>0</button>
<button>.</button>
<button class="equal">=</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions calculator/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
let input=document.getElementById('inputContainer');
let buttons = document.querySelectorAll('button');

let string ="";
let arr = Array.from(buttons);
arr.forEach(button =>{
button.addEventListener('click',(a) => {
if(a.target.innerHTML == '='){
string =eval(string);
input.value =string;
}
else if(a.target.innerHTML == 'AC'){
string= "";
input.value =string;
}
else if (a.target.innerHTML == 'DEL')
{
string = string.substring(0,string.length-1);
input.value= string;
}
else{
string += a.target.innerHTML;
input.value = string;
}

})
})
74 changes: 74 additions & 0 deletions calculator/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,500;0,700;1,400&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;

}
body{
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(46deg,#0a0a0a,#37404d);

}

.calculator{
border: 1px solid #74767b;
padding: 25px;
border-radius: 25px;
background: transparent;
box-shadow: 0px 4px 16px rgba(114, 116, 120, 0.5);

}


button{
border: none;
height: 62px;
width: 62px;

margin: 10px;
border-radius: 55%;

font-size: 22px;
box-shadow: -9px -9px 16px rgba(256,256,256,0.1);
background: transparent;
color: #ffffff;
cursor: pointer;

}

input{
padding: 25px;
margin: 10px;
width: 360px;
border: none;
color: #ffffff;
background: transparent;
box-shadow: 0px 4px 16px rgbs(85,85,85,0.1) ;
font-size: 45px;
text-align: right;
cursor: pointer;

}

input::placeholder{
color: #ffffff;
}

.equal{
background-color: #f77912;

}
.oprtr{
color: #f4e008
}

.operator{
color: #71eb14;
}

Binary file added mlsa-ppt.pdf
Binary file not shown.
Binary file added report-mlsa.pdf
Binary file not shown.
105 changes: 105 additions & 0 deletions todo/Todo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do List Application</title>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
font-family: Arial, sans-serif;
max-width: 500px;
margin: 0 auto;
padding: 20px;
}
h1 {
text-align: center;
}
#task-input {
width: 70%;
padding: 10px;
}
#add-task {
width: 25%;
padding: 10px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
margin: 10px;
}
#task-list {
list-style-type: none;
padding: 0;
}
#task-list li {
margin: 10px 0;
padding: 10px;
background-color: #f1f1f1;
display: flex;
min-width: 500px;
justify-content: space-between;
}
.remove-task {
background-color: #f44336;
color: white;
border: none;
padding: 5px 10px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>To-Do List</h1>
<input type="text" id="task-input" placeholder="Enter a new task">
<button id="add-task">Add Task</button>
<ul id="task-list"></ul>

<script>
let tasks = [];

const taskInput = document.getElementById('task-input');
const addTaskButton = document.getElementById('add-task');
const taskList = document.getElementById('task-list');

function addTask() {
const taskText = taskInput.value.trim();
if (taskText) {
tasks.push(taskText);
taskInput.value = '';
displayTasks();
}
}

function removeTask(index) {
tasks.splice(index, 1);
displayTasks();
}

function displayTasks() {
taskList.innerHTML = '';
tasks.forEach((task, index) => {
const li = document.createElement('li');
li.textContent = task;
const removeButton = document.createElement('button');
removeButton.textContent = 'Remove';
removeButton.classList.add('remove-task');
removeButton.onclick = () => removeTask(index);
li.appendChild(removeButton);
taskList.appendChild(li);
});
}

addTaskButton.addEventListener('click', addTask);
taskInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
addTask();
}
});

displayTasks();
</script>
</body>
</html>