From 43eff581a4e8911620f375f4acf52ea56a373dbe Mon Sep 17 00:00:00 2001 From: hishamm-10 Date: Fri, 29 Nov 2024 02:31:38 +0530 Subject: [PATCH 1/4] shopping-cart --- 1-js-basics/1-data-types/solution.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 1-js-basics/1-data-types/solution.md diff --git a/1-js-basics/1-data-types/solution.md b/1-js-basics/1-data-types/solution.md new file mode 100644 index 0000000..531bb1c --- /dev/null +++ b/1-js-basics/1-data-types/solution.md @@ -0,0 +1,17 @@ +# Data Types in a Shopping Cart + +## Introduction +A shopping cart requires various data types to manage products, user interactions, and calculations. Below is an overview of the data types used, their purposes, and why they are essential. + +--- + +## Data Types + +### 1. **String** +- **Purpose:** Store textual data like product names, user details, and currency symbols. +- **Example:** + ```javascript + let productName = "Wireless Headphones"; + let userName = "John Doe"; + let currency = "$"; + From c14679c234fbd5a29a16b58cd312acf8bfa9f3c8 Mon Sep 17 00:00:00 2001 From: hishamm-10 Date: Sun, 8 Dec 2024 13:43:55 +0530 Subject: [PATCH 2/4] complete js basics --- 1-js-basics/solution.md | 209 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 1-js-basics/solution.md diff --git a/1-js-basics/solution.md b/1-js-basics/solution.md new file mode 100644 index 0000000..1b35aa0 --- /dev/null +++ b/1-js-basics/solution.md @@ -0,0 +1,209 @@ +# Sub Topic 1 - Data Types + + ## Assignment : Data Type Practice + + ### Instruction : + -Imagine you are building a shopping cart. Write some documentation on the data types that you would need to complete your shopping experience. How did you arrive at your choices?- + + ### Solution : + Product : + 1, productName : String-> name of products in cart. + 2, qunatityItems : number-> number of each iteem in cart. + 3, itemPrice : number -> price of each item. + 4, availability : boolean -> weather the item is present or not. + + User : + 5, userName : string -> name of the user. + 6, userAddress : object -> as the address might change. + 7, userId : string -> seperate id for each users. + + Cart: + 8, countItem : number -> total items in cart. + 9, items : [prod1,prod2] -> array of objects. + 10, cartTotal : number -> total amount. + 11, isEmpty : boolean -> check wheather the cart is Empty or not. + + ## Challenge : + 1, Try this in your console: let age = 1; let Age = 2; age == Age (resolves false -- why?) : because case sensitivity, as 'a' and 'A'are Different. + a, if '''age == age; Age == Age''' will give True. + +# Sub Topic 2 - functions,methods +## Assignment : Fun with Functions + +### Instruction : +Create different functions, both functions that return something and functions that don't return anything. + +See if you can create a function that has a mix of parameters and parameters with default values. + + +### Solution : +1, Function that returns something: +```function addNumbers(a, b) { + return a + b; +} +``` + +2, Function that doesnot return Anything: +```function logMessage(message) { + console.log(message); +} +``` +3, Function with only default parameters: +``` function calculateDiscount(price, discountRate = 0.1) { + return price - price * discountRate; +} +``` +4, Arrow function that return something: +```const multiplyNumbers = (x, y) => x * y;``` +5, Arrow function that doesnot return anything: +```const logDate = () => { + console.log(`Today's date is ${new Date().toDateString()}`); +}; +``` + +## Challenge : +''' Functions are standalone blocks in javascript whereas methods are functions that are always associated with objects and depict their properties.''' + +# Sub Topic 3 - making decisions +## Assignment : Operators +### Instructions : +Play around with operaators. Heres a suggestion for a program you can implement: +You have a set of students from two different grading system. + +### Solution : + +``` +let allStudents = ['A', 'B-', 1, 4, 5, 2]; +let studentsWhoPass = []; + +for (let grade of allStudents) { + if (typeof grade === 'string') { + if (['A', 'A-', 'B', 'B-', 'C'].includes(grade)) { + studentsWhoPass.push(grade); + } + } else if (typeof grade === 'number' && [3, 4, 5].includes(grade)) { + studentsWhoPass.push(grade); + } +} + +console.log(studentsWhoPass); +``` +## Challenge : +Create a program that is written first with logical operators, and then +rewrite it using a ternary expression. What's your preferred syntax? +```function checkVotingEligibility(age) { + if (age >= 18) { + return "Eligible to vote"; + } else { + return "Not eligible to vote"; + } +} + +console.log(checkVotingEligibility(20)); // +console.log(checkVotingEligibility(16)); // +``` +Re-written : +```function checkVotingEligibility(age) { + return age >= 18 ? "Eligible to vote" : "Not eligible to vote"; +} + +console.log(checkVotingEligibility(20)); // +console.log(checkVotingEligibility(16)); // +``` +My preferance : + +Logical Operators (if-else): +Preferred when the logic is complex or involves multiple conditions. +Easier to read and maintain for nested or multi-step logic. + +Ternary Expression: +Ideal for simple conditions with straightforward outcomes. +Compact and efficient for small, clear logic. + +# Sub Topic 4 - arrays, loops +## Assignment : Loop an Array +### Instructions: +Create a program that lists every 3rd number between 1-20 and prints it to the console. +TIP: use a for-loop and modify the iteration-expression + +### Solution : +``` +for (let i = 1; i <= 20; i += 3) { + console.log(i); +} +``` +## Challenge: +1, For each : +```let allStudents = [ + 'A', + 'B-', + 1, + 4, + 5, + 2 +]; + +let studentsWhoPass = []; + +allStudents.forEach(grade => { + if (typeof grade === 'number' && grade >= 3) { + studentsWhoPass.push(grade); + } else if (typeof grade === 'string' && ['A', 'A-', 'B', 'B-', 'C'].includes(grade)) { + studentsWhoPass.push(grade); + } +}); + +console.log('Students who pass (forEach):', studentsWhoPass); +``` +2, for-of: +```let studentsWhoPass = []; + +for (let grade of allStudents) { + if (typeof grade === 'number' && grade >= 3) { + studentsWhoPass.push(grade); + } else if (typeof grade === 'string' && ['A', 'A-', 'B', 'B-', 'C'].includes(grade)) { + studentsWhoPass.push(grade); + } +} + +console.log('Students who pass (for-of):', studentsWhoPass); +``` +3,map: +```let studentsWhoPass = allStudents.map(grade => { + if (typeof grade === 'number' && grade >= 3) { + return grade; + } else if (typeof grade === 'string' && ['A', 'A-', 'B', 'B-', 'C'].includes(grade)) { + return grade; + } else { + return null; + } +}).filter(grade => grade !== null); + +console.log('Students who pass (map):', studentsWhoPass); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + From c56dd88c060c32f478fb5c240449da7c64d9ed4a Mon Sep 17 00:00:00 2001 From: hishamm-10 Date: Sun, 8 Dec 2024 14:41:50 +0530 Subject: [PATCH 3/4] 2-terrarium --- 2-terrarium/solution.md | 151 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 2-terrarium/solution.md diff --git a/2-terrarium/solution.md b/2-terrarium/solution.md new file mode 100644 index 0000000..24c2953 --- /dev/null +++ b/2-terrarium/solution.md @@ -0,0 +1,151 @@ +# My Terrarium +## Subtoipc 1: Intro to HTML + +### Assignment + Instruction: + Imagine you are designing, or redesigning, your personal web site. Create a graphical mockup of your site, and then write down the HTML markup you would use to build out the various elements of the site. You can use software of your choice, just make sure to hand-code the HTML markup. + + Solution : + ``` + + + + + Personal Website + + + +
+ +
+ +
+
+ Your Photo +
+

Hi, I'm [Your Name]

+

A [Your Profession]

+
+
+
+ +
+

My Work

+
+
+ Project 1 +

Project 1

+

Brief description of Project 1.

+
+
+ Project 2 +

Project 2

+

Brief description of Project 2.

+
+
+ Project 3 +

Project 3

+

Brief description of Project 3.

+
+
+ Project 4 +

Project 4

+

Brief description of Project 4.

+
+
+
+ + + + + ``` + +### Challenge + ``` +

Next Task

+
+ ``` + +## Suttopic 2: Intro to CSS +### Assignment + + +### Challenge +``` +.jar { + width: 200px; + height: 300px; + background: #b8e994; /* Light green jar color */ + border-radius: 50px; + position: relative; + overflow: hidden; +} + +.jar-glossy-long { + position: absolute; + width: 50px; + height: 200px; + background: linear-gradient(to top, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)); + border-radius: 25px; + bottom: 20px; + left: 20px; + transform: rotate(-15deg); +} + +.jar-glossy-short { + position: absolute; + width: 30px; + height: 100px; + background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 70%); + border-radius: 15px; + bottom: 40px; + left: 60px; + transform: rotate(-10deg); +} +``` + +## SubTopic-3: Intro to DOM and Closures +### Assignment + Insrtructions :Research the DOM a little more by 'adopting' a DOM element. Visit the MDN's list of DOM interfaces and pick one. Find it being used on a web site in the web, and write an explanation of how it is used. + + Solution : One common use of IntersectionObserver is for lazy loading images. For example, on websites like Medium or Unsplash, images outside the viewport are not immediately loaded to save bandwidth and improve performance. + +This technique is used on modern web platforms to: + Optimize Performance: Only load assets when needed. + Enhance User Experience: Faster page loads and reduced initial bandwidth consumption. + SEO-Friendly: Images still load for search engines that index content. + +### Challenge +```terrariumElement.addEventListener("dblclick", (event) => { + let highlightColor = "#FFD700"; + terrariumElement.style.border = "solid black 2px"; + terrariumElement.style.maxWidth = "85%"; + terrariumElement.style.background = highlightColor; + }); +``` + + + + + + + + + + + + From baaf8c9213623f0d868ea57bddc074ea85401cd8 Mon Sep 17 00:00:00 2001 From: hishamm-10 Date: Sun, 8 Dec 2024 16:22:56 +0530 Subject: [PATCH 4/4] typing-game --- 3-typing-game/image.png | Bin 0 -> 38544 bytes 3-typing-game/solution.md | 303 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 303 insertions(+) create mode 100644 3-typing-game/image.png create mode 100644 3-typing-game/solution.md diff --git a/3-typing-game/image.png b/3-typing-game/image.png new file mode 100644 index 0000000000000000000000000000000000000000..4fd64df6880624b8f1d358a150e1df186729f9c9 GIT binary patch literal 38544 zcmeGEby(Ef7d{M+$2x+51xOooDk-fPba#uCFf8Iixwfp>Q5GGBvVr(88;Wgv)7`Z@68jP(QM2M|bcIO&1eS@8OTlbpUQ1VUa< z{5jR+m}>!n#IndgdZ6{fWMSCzg{JoS@v3Sh;?i@=;w^&j(hj?($dmc zNWA%ej5)E3iyKx|RZU&7=qu3IynOlclvfDkV|;v`W{yhBnA7!qUe26ej;Iz3ZsL*t z{_?xTLhjdLRchOpdo#G)YnYSo^g2&Cqk1;^cW+ zJ`Lo4%B)e~dFnQr?A}kV$8GG^)z@q1>+qQ0g+z;&;tNnP0&TEjR!t6+clq$-dH(RC z{uW!C*Zn2@2^}O96e3jAK=ipPNn(x9Ah~yL-n<#~{{0=Q69GZAP|vcez`H=;{8YL@ zsi`*t-oCvado!@XW zb{en_ZV)2bdRG0@`ONwAbipK37aUbnRB)|DID*r_g@AW&Ih&tpXw@qAZMAZ3%y1Qb zY_NzOcFxt32qXeU0Sh<;8ptDvRO$K&6ZS{#R7~ zBym6~$La$KYi)en``7O|r9KH~v>z%MxGrp`SA6dM)bzCN?9Vi>xvaPl?WytCxBZ|P zI7{j7YZ~VO*L(D0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+_LW3)@GhS*LRK~y77VfOk-W7VDsOhfK-&l8Vc7GPzc}r0I`av= zt3|SFtIf~LP>AgK#>Hha{FB8xHo@G2IJFa?G;SjHwYuCwKPMVv4b1nQ{hQMK6$@nN zc68+uAV8$<`xJu~L;Z=g0j`nWr`^lW_`$#9&42P+ zd{cFqZ0s20EG{kOBmvxONuSu4AvfmLIE+vQ^e1KgpSJL?SRgxhX-k--L)s`_I+U?D z09e-=w*s~G|An9cWBf^wgJ5LeB)UnE6XPg`ACWST*bLlc*|1*PGAlSDYCm^fEJ-Dz zmW-uHYCk;pgd06P}$){25G0y;8Y^MxQ{WlXo$TgZzNE1VAJCHJ7RFVe&*kbsPdZ2HfdzmBus1qE` zCz0@R0H&^FA5;afH6f~%&Rh>z`7M7UpeKL9g5`5JXQvG0&I33b0O&Haee`wsk*D7mKr&TRYi&%pSMoE*r~?j-K`nJfPWA&WB8 literal 0 HcmV?d00001 diff --git a/3-typing-game/solution.md b/3-typing-game/solution.md new file mode 100644 index 0000000..46a385b --- /dev/null +++ b/3-typing-game/solution.md @@ -0,0 +1,303 @@ +# 3-typing-game + +## my-typing game: + +index.html +``` + + + + + + Typing Game + + + +

Typing Game!

+

Practice your typing skills with a quote from Sherlock Holmes. Click Start to begin!

+

+

+
+ + +
+ + + +``` +style.css +``` +body { + font-family: Arial, sans-serif; + text-align: center; + margin: 0; + padding: 20px; + background-color: #f4f4f9; + } + + h1 { + color: #333; + } + + p { + font-size: 1.2em; + margin: 10px 0; + } + + #quote { + font-size: 1.5em; + font-weight: bold; + margin: 20px auto; + max-width: 600px; + line-height: 1.6; + text-align: justify; + } + + .highlight { + background-color: yellow; + } + + .error { + background-color: lightcoral; + border: 2px solid red; + } + + input[type="text"] { + font-size: 1em; + padding: 10px; + margin-right: 10px; + } + + button { + padding: 10px 15px; + font-size: 1em; + background-color: #007bff; + color: #fff; + border: none; + cursor: pointer; + } + + button:hover { + background-color: #0056b3; + } +``` +script.js +```// inside script.js +// all of our quotes +const quotes = [ + 'When you have eliminated the impossible, whatever remains, however improbable, must be the truth.', + 'There is nothing more deceptive than an obvious fact.', + 'I ought to know by this time that when a fact appears to be opposed to a long train of deductions it invariably proves to be capable of bearing some other interpretation.', + 'I never make exceptions. An exception disproves the rule.', + 'What one man can invent another can discover.', + 'Nothing clears up a case so much as stating it to another person.', + 'Education never ends, Watson. It is a series of lessons, with the greatest for the last.', +]; +// store the list of words and the index of the word the player is currently typing +let words = []; +let wordIndex = 0; +// the starting time +let startTime = Date.now(); +// page elements +const quoteElement = document.getElementById('quote'); +const messageElement = document.getElementById('message'); +const typedValueElement = document.getElementById('typed-value'); + +// at the end of script.js +document.getElementById('start').addEventListener('click', () => { + // get a quote + const quoteIndex = Math.floor(Math.random() * quotes.length); + const quote = quotes[quoteIndex]; + // Put the quote into an array of words + words = quote.split(' '); + // reset the word index for tracking + wordIndex = 0; + + // UI updates + // Create an array of span elements so we can set a class + const spanWords = words.map(function(word) { return `${word} `}); + // Convert into string and set as innerHTML on quote display + quoteElement.innerHTML = spanWords.join(''); + // Highlight the first word + quoteElement.childNodes[0].className = 'highlight'; + // Clear any prior messages + messageElement.innerText = ''; + + // Setup the textbox + // Clear the textbox + typedValueElement.value = ''; + // set focus + typedValueElement.focus(); + // set the event handler + + // Start the timer + startTime = new Date().getTime(); + }); + + // at the end of script.js +typedValueElement.addEventListener('input', () => { + // Get the current word + const currentWord = words[wordIndex]; + // get the current value + const typedValue = typedValueElement.value; + + if (typedValue === currentWord && wordIndex === words.length - 1) { + // end of sentence + // Display success + const elapsedTime = new Date().getTime() - startTime; + const message = `CONGRATULATIONS! You finished in ${elapsedTime / 1000} seconds.`; + messageElement.innerText = message; + } else if (typedValue.endsWith(' ') && typedValue.trim() === currentWord) { + // end of word + // clear the typedValueElement for the new word + typedValueElement.value = ''; + // move to the next word + wordIndex++; + // reset the class name for all elements in quote + for (const wordElement of quoteElement.childNodes) { + wordElement.className = ''; + } + // highlight the new word + quoteElement.childNodes[wordIndex].className = 'highlight'; + } else if (currentWord.startsWith(typedValue)) { + // currently correct + // highlight the next word + typedValueElement.className = ''; + } else { + // error state + typedValueElement.className = 'error'; + } + }); + ``` + +## Assignment +Instructions: +Create a small game that uses keyboard events to do tasks. It may be a different kind of typing game, or an art type game that paints pixels to the screen on keystrokes. Get creative! Try to implement concepts that you have learnt in this topic. + +Solution: + + +![alt text](image.png) +index.html +``` + + + + + hishams Pixel Painter + + + +

Pixel Painter

+

Use arrow keys to move the cursor and press the spacebar to paint!

+
+ + + +``` +style.css +``` +body { + font-family: Arial, sans-serif; + text-align: center; + background-color: #f4f4f9; + margin: 0; + padding: 20px; + } + + h1 { + color: #333; + margin-bottom: 10px; + } + + p { + font-size: 1.2em; + } + + .grid { + display: grid; + grid-template-columns: repeat(10, 30px); + grid-gap: 2px; + margin: 20px auto; + width: fit-content; + } + + .cell { + width: 30px; + height: 30px; + background-color: white; + border: 1px solid #ddd; + } + + .cursor { + border: 2px solid red; + } + + .painted { + background-color: #ffeb3b; + } + ``` + + script.js + ```const grid = document.getElementById('grid'); + +// Create a 10x10 grid +for (let i = 0; i < 100; i++) { + const cell = document.createElement('div'); + cell.classList.add('cell'); + grid.appendChild(cell); +} + +// Initialize cursor position +let cursorX = 0; +let cursorY = 0; + +// Helper function to get cell index +const getCellIndex = (x, y) => y * 10 + x; + +// Get all cells +const cells = document.querySelectorAll('.cell'); + +// Add initial cursor +cells[getCellIndex(cursorX, cursorY)].classList.add('cursor'); + +// Event listener for keyboard events +document.addEventListener('keydown', (e) => { + // Remove the cursor class from the current cell + cells[getCellIndex(cursorX, cursorY)].classList.remove('cursor'); + + // Move the cursor based on keypress + if (e.key === 'ArrowUp' && cursorY > 0) cursorY--; + if (e.key === 'ArrowDown' && cursorY < 9) cursorY++; + if (e.key === 'ArrowLeft' && cursorX > 0) cursorX--; + if (e.key === 'ArrowRight' && cursorX < 9) cursorX++; + + // Paint the cell if spacebar is pressed + if (e.key === ' ') { + cells[getCellIndex(cursorX, cursorY)].classList.add('painted'); + } + + // Clear the grid if 'C' is pressed + if (e.key.toLowerCase() === 'c') { + cells.forEach(cell => cell.classList.remove('painted')); + } + + // Add the cursor class to the new cell + cells[getCellIndex(cursorX, cursorY)].classList.add('cursor'); +}); +``` + + + + + + + + + + + + + + +