Skip to content
Merged
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
5 changes: 5 additions & 0 deletions Students/Aakriti/Python/class.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
number= int(input("Enter a number:"))
if number %2==0:
print("The number is even")
else:
print("The given number is odd")
70 changes: 70 additions & 0 deletions Students/Aakriti/Python/task1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# "The Smart Checkout System"
# Objective: Create a JavaScript program that simulates a simple shopping cart checkout process.

# Instructions for Students:
# Write a code script that performs the following steps in order:

# Setup the Store:

# Create a const variable for walletBalance and set it to 5000.
# Create an array called cartItems containing three prices: [500, 1200, 350].
# Manage the Cart (Array Operations):

# A new item is added! Use .push() to add a price of 2000 to the cart.
# Oops, that item is too expensive. Use .pop() to remove the last item.
# Create a new array called recommendedItems with prices [100, 200].
# combine recommendedItems and cartItems into a new array called finalCart using the Spread Operator (...).
# Calculate Totals (Math & Operators):

# Calculate the sum of the prices in finalCart (Hint: since we don't have loops yet, access them manually like finalCart[0] + finalCart[1]...).
# Store this sum in a variable totalPrice.
# Add a 10% tax to the logic. Update totalPrice to include the tax.
# Round the totalPrice to 2 decimal places using .toFixed().
# Coupon Code Handling (String Manipulation):

# Create a variable couponCode with the messy value " DisCOunT10 ".
# Clean up the code: Remove the whitespace using .trim() and convert it to uppercase.
# If the cleaned code is "DISCOUNT10", subtract 500 from the totalPrice.
# Final Decision (Conditionals):

# Write an if/else statement:
# If totalPrice is less than or equal to walletBalance: Console log "Purchase Successful! New Balance: [Remaining Amount]".
# Else: Console log "Insufficient Funds! You need [Missing Amount] more."
# Receipt Generation (Randomness):

# Generate a random Order ID between 1 and 100 using Math.random() and Math.floor().
# Console log a receipt message using Template Literals (backticks): Order [ID] confirmed. Thank you for shopping!
Comment on lines +2 to +36


import random
WalletBalance=5000
CartItems=[500,1200,350]
CartItems.append(2000)
print(CartItems)
CartItems.pop()
print(CartItems)

RecommendedItems=[100,200]# we can use *or + or extent to destructure lists and make one list out of them
FinalCart=CartItems+RecommendedItems
print(FinalCart)
TotalPrice=FinalCart[0]+FinalCart[1]+FinalCart[2]+FinalCart[3]+FinalCart[4]
print(TotalPrice)

TotalPricewithTax= TotalPrice+(10/100)*TotalPrice
print(TotalPricewithTax)

CuponCode =" DisCOunT10 "
print(CuponCode.strip().upper())
if CuponCode=="DISCOUNT10":
TotalPrice-=500

if TotalPrice<= WalletBalance:
NewBalance=WalletBalance-TotalPrice
print(f"Purchase Sucessfull New Balance={NewBalance}")
OrderID=random.randint(1,101)
print(f" {OrderID} Confimed!!!! Thankyou for shopping")

else:
MissingBalance=TotalPrice-WalletBalance
Comment on lines +51 to +68
print(f"Insufficient Balance!!! You need {MissingBalance} more")

25 changes: 25 additions & 0 deletions Students/Aakriti/bgcolor_change.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.btn{
background-color: burlywood;
border-radius: 25px;
padding: 10px;
}
</style>
</head>
<body>
<button class="btn">Change Background</button>
<script>
const btn=document.querySelector('.btn');
console.log(btn.innerText)
btn.innerText += "Clicked";
btn.style.backgroundColor= "green";
console.log(btn)
Comment on lines +19 to +22
</script>
</body>
</html>
10 changes: 3 additions & 7 deletions Students/Aakriti/dom.html → Students/Aakriti/click.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.butn{
/* background-color: blueviolet; */
}
</style>
<script>
function clicked(){
button.textContent="Clicked";
button.style.backgroundcolor
const butn = document.querySelector(".butn");
butn.textContent = "Clicked";

}
</script>
</head>
Expand Down
49 changes: 49 additions & 0 deletions Students/Aakriti/cocacola.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>Coca-Cola</h1>
<h2>Quantity</h2>
<h3 id="cid">1</h3>
<h3 id="price"></h3>
<button id="decButton">-</button>
<button id="incButton">+</button>

<script>

let count=0;
const price =80;
let total=0;
const cocaColaId=document.getElementById('cid');
const priceCocacola=document.getElementById('price');
const decButton =document.getElementById('decButton');
const incButton=document.getElementById('incButton');

priceCocacola.innerHTML= price;

incButton.addEventListener("click", function(){

total+=price;
priceCocacola.innerHTML=total;
count++;
cocaColaId.textContent=count;
});
Comment on lines +11 to +34

decButton.addEventListener("click", function(){
if(count>0){

total-=price;
priceCocacola.innerHTML=total;
count--;
cocaColaId.textContent=count;
}

});

</script>
</body>
</html>
60 changes: 60 additions & 0 deletions Students/Aakriti/display.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.display{

}
</style>
</head>
<body>
<div class="display">

</div>

<script>

const letslearnUsers=[
{
name:"saugat Bagale",
age:23,
isLogin:true,
cources:["Python","Django","MERN","s"],
"present days":['sun',"mon","tues"]
},
{
name:"Nishant",
age:24,
isLogin:false,
cources:["Python","Django","MERN","s"],
"present days":['sun',"mon","tues"]
},
{
name:"Aakriti",
age:22,
isLogin:true,
cources:["Python","Django","MERN","s"],
"present days":['sun',"mon","tues"]
}
]
const displayUsers = document.querySelector('.display')

let Container=document.createElement('div')
letslearnUsers.forEach(users => {
// const Container=document.createElement('div')

Container.innerHTML=`Name=${users.name}\n
Comment on lines +46 to +49
Age is ${users.age}\n
Login status: ${users.isLogin}\n
courses interested is ${users.cources}`

});
displayUsers.appendChild(Container);
Comment on lines +45 to +55

console.log(displayUsers);
</script>
</body>
</html>
31 changes: 31 additions & 0 deletions Students/Aakriti/inc_dec_btn.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>Counter</title>
</head>
<body>
<h1 id="counter">0</h1>
<button id="increment">Increment</button>
<button id="decrement">Decrement</button>

<script>
let count = 0;
const counterElement = document.getElementById("counter");
const incrementButton = document.getElementById("increment");
const decrementButton = document.getElementById("decrement");

incrementButton.addEventListener("click", function() {
count++;
counterElement.textContent = count;
});

decrementButton.addEventListener("click", function() {
count--;
counterElement.textContent = count;
Comment on lines +25 to +26
});
</script>

</body>
</html>
Loading
Loading