Skip to the content.

Trimester 3

Organized Information

Trimester 3

Crowdsourcing

Crowdsourcing is a method of collecting help, ideas, or input from a large and varied group of people, typically through online platforms. The broader the crowdsourcing effort, the more you go beyond your immediate circle, the better chance you have to reduce Computer Bias.

  • Popcorn Hack #1: What are the different types of crowdsourcing, and how do they contribute to innovation? Provide a brief description of each type:
    • Crowdfunding - Raising money by collecting small contributions from a large group of people.
    • Crowd Creation - Gathering creative input from a crowd, often for content generation or design.
    • Crowd Voting - Collecting public opinion or feedback to make decisions or rank options.
    • Crowd Wisdom - Using collective intelligence for decision-making or problem-solving.
  • Data Crowdsourcing & Open Source Development
  • Distributed Computing Data Crowdsourcing: Data crowdsourcing is a method of collecting data from a large group of people, typically through online platforms.
    - Data creates Quick data collection, Diverse input, Cost-effective, and Scalability.
    - Open Source Development: Open source development is a way of building software where the code is shared openly with the public. - This means anyone can view, use, improve, and share the code. - It can be hard to manage lots of different contributors. - Project leaders can get overwhelmed and it can also be unreliable (maintainer burnout). - It’s important to follow legal rules about using and sharing code (licenses). - What is data crowdsourcing, and how does it contribute to open-source development? - Data crowdsourcing is the process of collecting and compiling large amounts of data from a distributed group of individuals, often through online platforms. - An example is wikipedia which is an online information platform for knowledge. - Distributed Computing: - Distributed computing involves a system of multiple computers working together over a network to solve a problem or complete a task. These systems share resources, such as processing power, storage, and data, to achieve a common goal.

    - Popcorn Hack: How does distributed computing contribute to innovations through crowdsourcing? - Distributed computing refers to a system where computing tasks are spread across multiple networked devices, allowing large-scale processing of complex problems. When combined with crowdsourcing, it enables significant innovations by leveraging the collective power of volunteers’ devices to solve scientific, medical, and technological challenges.
Beneficial and Harmful Effects

AI is a new technology that has crated a lot of controversy. It has lead to a great increase in eficiency and automation so people can have more specialized jobs. It has also lead to quick diagnoses and information in the vast arrary of medical implications. However there is a lot of job displacement. Though AI is taking over some jobs that are repetitive and don’t require personalization, many new jobs are being introduced. Since job displacement is invesitable, I think AI is more benifiical than harmful. However, environmentally there is a major impact on global warming. therefore, I think that while AI can result in more benifits, it should be limited in use..

Computing Bias

Notes: Computing bias occurs when computer programs, algorithms, or systems produce results that unfairly favor or disadvantage certain groups. Creates flawed data and outputs Happens because of Unrepresentative or Incomplete Data, Flawed or Biased Data, and Data Collection & Labeling (Human annotators may introduce biases due to different cultural or personal biases during the data labeling process). Explicit data: Data that the user or programmer directly provides. Implicit data: Data that is inferred from the user’s actions or behavior, not directly provided. Implicit Data can lead to reinforcing bias by suggesting content based on past behavior, potentially limiting diversity and preventing users from discovering new genres. Explicit Data is generally more accurate but can still be biased if user input is limited or influenced by the design of the platform. Algorithmic bias is bias generated from a repeatable but faulty computer system that produces inaccurate results. ex: AI analyzing resumes to filter them out. Finds that some key words are used more my a specific ethniticity which makes them biased in the data. Data bias occurs when the data itself includes bias caused by incomplete or erroneous informations.

  • HW: Explain the difference between implicit and explicit data. Provide an example of each: Explicit data is where a user or system directly provides data. Implicit data is when data is not directly provided but is inferred from other information. An example of explicit data is a user inputting their name, gender, and age when signing up for Netflix. Implicit data is a suggestion Netflix gives a user based on their previous watches.
Digital Divide

The digital divide refers to the gap between those who have easy access to digital technology and those who do not, impacting education, employment, and innovation opportunities.

• POPCORN HACK #1: Identify one area (e.g., education, employment, healthcare, or community participation) where you’ve seen the digital divide in action. How does it affect people in different socioeconomic backgrounds?
One clear example of the digital divide is in education. Students from lower-income backgrounds often lack access to high-speed internet, personal computers, or even a quiet space to study. This makes it harder for them to complete online assignments, attend virtual classes, or access digital learning resources. In contrast, students from wealthier families usually have access to multiple devices, reliable internet, and additional learning tools like online tutoring or educational subscriptions. This gap creates unequal learning opportunities, making it more difficult for underprivileged students to keep up with their peers, ultimately affecting their academic performance and future career prospects. HOMEWORK: Despite India's growing tech industry, poverty keeps millions disconnected from digital learning. When I visited India, I saw how the digital world separated communities and resources immensely. I saw that many families can’t afford textbooks, let alone internet access or Wikipedia. To raise awareness, I can use social media, blogs, or local events to highlight the issue and push for action. Those that have access to these should be ethically responsible for advocating the bridge the digital divide and interact with these event and blogs. I could also donate old devices, fund low-cost internet initiatives, or volunteer for digital literacy programs that teach students essential tech skills.
POPCORN HACK #2: Voice assistants like Siri or Alexa can unintentionally exclude people with strong accents or speech impairments. This happens because these systems are trained mostly on standard speech patterns, making them less accurate for diverse voices.

Legal Ethical Concerns

Popcorn Hack #1: What is a legal concern that arises when sharing/using code? - Violating software licenses 2. Copyright/incorrect citation of work 3. Using code from a repo without a license What is an ethical concern that arises when sharing/using code? - Claiming others work as your own Legal Concerns: Intellectual Property (IP): Intellectual Property (IP) refers to creations of the mind, including inventions, literary and artistic works, designs, symbols, names, and images used in commerce. Digital Impact on IP: The digitization of information has made it easier to share, copy, and distribute content online. While this has increased accessibility, it has also raised concerns about ownership, unauthorized use, and infringement. Businesses and individuals struggle to protect their digital assets from unauthorized replication or misuse. Popcorn Hack #2: You're building an open-source lyric guessing app. You want it to spread fast, but also don’t want big corporations to steal your work (without giving you credit!). Which license do you pick? I would use the GPL license because it protects my work while also being able to distribute it as an open source.
POPCORN HACK #2: Voice assistants like Siri or Alexa can unintentionally exclude people with strong accents or speech impairments. This happens because these systems are trained mostly on standard speech patterns, making them less accurate for diverse voices.

Safe Computing

- Revolves around PII (Personally Identifiable Information) - Information that identifies a user on the internet - Social Security, email, full name, etc. - Cookies - A variety of different cookies that are used in different sites: - Session Cookies: Temporary cookies that are deleted when the browser is closed. - Persistent Cookies: Stored on a user’s device for a specified duration, even after the browser is closed. - First-Party Cookies: Set by the website being visited, mainly for user experience and analytics. - Third-Party Cookies: Placed by external domains (e.g., advertisers) to track user behavior across sites. - These cookies track your PII, track your history on the site, and provide recommendations based on that history - Can breach security of users - Password Security - Minimum 10 characters - Use of both uppercase and lowercase lettering - Contains at least one number - Contains at least one special character - Encryption - Encryption is the process of converting data into a coded format to prevent unauthorized access. It ensures only authorized user can read the information. - Symmetric Encryption (Private Key Encryption) - The same key is used for both encryption and decryption - Faster but requires securely sharing the key between parties - Asymmetric Encryption (Public Key Encryption) - Public Key (for encryption) - Private key (for decryption) - More secure for internet communications since users don’t need to share a single key - Hashing (One-way encryption) - Converts data into a fixed length string that cannot be reversed - Used for storing passwordss securely. - Example: SHA-256 (Secure Hash Algorithm) used in blockchain and password security. - Where Encryption is Used: - Web Security: HTTPS (SSL/TLS encryption) protects websitess from eavesdropping - Messaging Apps: End-to-end encryption ensures that messages are private - Phishing - Phishing is a cyber-attack where scammers trick you into giving personal information (such as bank details or passwords) by pretending to be a legal entity, usually through fake emails, messages, or websites. - Ex. Email Phishing - Attackers send fake emails pretending to be trusted companies - Website Spoofing - Attackers can also create fake versions of popular websites to steal login credentials. Some popularly “spoofed” websites include Google, Amazon and various banking sites - Smishing - Hackers also send fake text images pretending to be from banks, delivery services, or government agencies, urging you to click a malicious link. - Verification - Verification is a crucial aspect of safe computing, ensuring that users, systems, and software are legitimate and secure. - Multi-Factor Authentification (MFA) - Added security process that requires users to verify their identity using multiple independent authentication factors. - Digital Structures - CAPTCHA - A common pop-up that ensure the user is not a bot

    • </ul> </li>

      HOMEWORK: def caesar_cipher(text, shift, mode): result = "" for char in text: if char.isalpha(): # This part of the code only encrypts letters shift_amount = shift if mode == "encrypt" else -shift new_char = chr(((ord(char.lower()) - 97 + shift_amount) % 26) + 97) result += new_char.upper() if char.isupper() else new_char else: result += char # this keeps the spaces and position unchanged return result mode = input("Do you want to encrypt or decrypt? ").strip().lower() message = input("Enter your message: ") shift_input = input("Enter shift value (number of places to shift or 'random'): ").strip().lower() if shift_input == "random": shift = random.randint(1, 25) print(f"Random value : {shift}") else: shift = int(shift_input) output = caesar_cipher(message, shift, mode) print(f"Result: {output}")

      </li> </ul> </div> </div>
      Binary Search Algorithms

      Notes: Binary Search Algorithm - Binary is a Base-2 number system made up of 0 and 1 - use binary to represent text, images, video, music, and logic. - one bit= 1 digit (0 or 1) - one byte = 8 bits -> represent 256 values - Images store pixel data using binary (e.g., RGB color codes) - Text uses ASCII or Unicode, which map characters to binary values (e.g., "A" = 01000001) - Music and videos are stored and transmitted as binary streams Binary Search vs Linear Search - Binary Search is a powerful algorithm used to quickly find an element in a sorted list by repeatedly dividing the search interval in half. Check the middle element If it’s the target, return it If not, search the left or right half Repeat until found or empty Binary Search vs Linear Search - Binary Search is a powerful algorithm used to quickly find an element in a sorted list by repeatedly dividing the search interval in half. Check the middle element If it’s the target, return it If not, search the left or right half Repeat until found or empty Binary search is efficient because it divides the search space in half with every step. Here’s how its time complexity breaks down: 🧠 At each step, we eliminate half of the remaining elements. 🧮 This “halving” continues until there’s only one element left. ✨ This gives us a logarithmic number of steps — specifically: Time Complexity: O(log₂ n) Where n is the number of elements in the list.
      Popcorn Hack: Binary Digit 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰ Example: 1101 1 1 0 1 1 0 0 1 Popcorn Hack #2: Binary Blitz! Convert the following decimals into binary: 10, 15, 17 10 = 1010 15 = 1111 17 = 10001 🍿 Popcorn Hack #3: Half & Half! Given the sequence of numbers, how would you search for the number 18? `[3, 6, 9, 12, 15, 18, 21, 24]` - I would split it into half, and then search the right side.

      • HW: Homework Hack: Part A - 42/2 = 21 remainder 0. 21/2= 10 remainder 1. 10/2= 5 remainder 0. 5/2=2 remainder 1. 2/2=1 remainder 0. 1/2=0 remainder 1 = 101010 19/2 = 9 remainder 1. 9/2= 4 remainder 1. 4/2=2 remainder 0. 2/2=1 remainder 0. 1/2=0 remainder 1 = 10011 100/2=50 remainder 0. 50/2=25 remainder 0. 25/2=12 remainder 1. 12/2=6 remainder 0. 6/2=3 remainder 0. 3/2= 1 remainder 1. 1/2=0 remainder 1 = 1100100 Part B: 1. 101010 = 2^5 = 32 + 2^3 = 8 + 2^1-2 = 42 2. 10011 = 2^4=16 + 2^1=2 + 2^0=1 = 19 3. 110011 = 2^5=32 + 2^4=16 + 2^1=2 + 2^0=1 = 51 Part C: [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33] 1. Split in half. Then it would be easier to organize. Initial list: Low = 0, High = 10 Mid = (0+10)//2 = 5 → list[5] = 18 1 comparison made target found Low = 0, High = 10 Mid = (0+10)//2 = 5 → list[5] = 18 → 33 > 18 → search right half Low = 6, High = 10 → Mid = (6+10)//2 = 8 → list[8] = 27 → 33 > 27 Low = 9, High = 10 → Mid = (9+10)//2 = 9 → list[9] = 30 → 33 > 30 Low = 10, High = 10 → Mid = (10+10)//2 = 10 → list[10] = 33 4 comparisons made target found Low = 0, High = 10 Mid = 5 → list[5] = 18 → 5 < 18 → search left half Low = 0, High = 4 → Mid = 2 → list[2] = 9 → 5 < 9 Low = 0, High = 1 → Mid = 0 → list[0] = 3 → 5 > 3 Low = 1, High = 1 → Mid = 1 → list[1] = 6 → 5 < 6 4 comparisons made Not found Part D: "mango" Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "mango" > "grape" low = 6, high = 10 → mid = 8, list[8] = "orange" → "mango" < "orange" low = 6, high = 7 → mid = 6, list[6] = "kiwi" → "mango" > "kiwi" low = 7, high = 7 → mid = 7, list[7] = "mango" → ✅ Found! 4 Comparisons Found "carrot" Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "carrot" < "grape" low = 0, high = 4 → mid = 2, list[2] = "carrot" 2 comparisons found "lemon" (not in list) Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "lemon" > "grape" low = 6, high = 10 → mid = 8, list[8] = "orange" → "lemon" < "orange" low = 6, high = 7 → mid = 6, list[6] = "kiwi" → "lemon" > "kiwi" low = 7, high = 7 → mid = 7, list[7] = "mango" → "lemon" < "mango" FRQS: Why is binary search more efficient for large data than linear search? - Binary search is more efficient because it repeatedly cuts the data in half, instead of having to search through every item. It is a lot easier to split the book in half and then go either left or right from that point than to read through every single word. What happens if the list isn’t sorted and you try to use binary search? - If the list isn't stored then the binary search would not work and the algorithm would likely return the false target or fail to return. Could you use binary search in a video game leaderboard or streaming service search bar? Why or why not? - Yes, you could. Because the leaderboard scores are sorted, it is efficient to use binary search. Video games have both sorted and large amounts of data making it applicable. However, streaming services have data tat is unsorted and randomized which makes binary search inadequate.
      Binary Search Algorithm - Binary is a Base-2 number system made up of 0 and 1 - use binary to represent text, images, video, music, and logic. - one bit= 1 digit (0 or 1) - one byte = 8 bits -> represent 256 values - Images store pixel data using binary (e.g., RGB color codes) - Text uses ASCII or Unicode, which map characters to binary values (e.g., "A" = 01000001) - Music and videos are stored and transmitted as binary streams - Converting Between Binary & Decimal - Divide the number by 2 - Record the remainder - Repeat until the quotient is 0 - Read the remainders bottom to top - the remainder (0 or 1) is the binary number 🍿 Popcorn Hack #2: Binary Blitz! Convert the following decimals into binary: 10, 15, 17 10 = 1010 15 = 1111 17 = 10001 Binary Search vs Linear Search - Binary Search is a powerful algorithm used to quickly find an element in a sorted list by repeatedly dividing the search interval in half. Check the middle element If it’s the target, return it If not, search the left or right half Repeat until found or empty 🚫 List must be sorted 😵 Not useful for very small datasets 🧩 A bit more complex to code 🍿 Popcorn Hack #3: Half & Half! Given the sequence of numbers, how would you search for the number 18? `[3, 6, 9, 12, 15, 18, 21, 24]` - I would split it into half, and then search the right side. Binary search is efficient because it divides the search space in half with every step. Here’s how its time complexity breaks down: 🧠 At each step, we eliminate half of the remaining elements. 🧮 This “halving” continues until there’s only one element left. ✨ This gives us a logarithmic number of steps — specifically: Time Complexity: O(log₂ n) Where n is the number of elements in the list. Homework Hack: Part A - 42/2 = 21 remainder 0. 21/2= 10 remainder 1. 10/2= 5 remainder 0. 5/2=2 remainder 1. 2/2=1 remainder 0. 1/2=0 remainder 1 = 101010 19/2 = 9 remainder 1. 9/2= 4 remainder 1. 4/2=2 remainder 0. 2/2=1 remainder 0. 1/2=0 remainder 1 = 10011 100/2=50 remainder 0. 50/2=25 remainder 0. 25/2=12 remainder 1. 12/2=6 remainder 0. 6/2=3 remainder 0. 3/2= 1 remainder 1. 1/2=0 remainder 1 = 1100100 Part B: 1. 101010 = 2^5 = 32 + 2^3 = 8 + 2^1-2 = 42 2. 10011 = 2^4=16 + 2^1=2 + 2^0=1 = 19 3. 110011 = 2^5=32 + 2^4=16 + 2^1=2 + 2^0=1 = 51 Part C: [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33] 1. Split in half. Then it would be easier to organize. Initial list: Low = 0, High = 10 Mid = (0+10)//2 = 5 → list[5] = 18 1 comparison made target found Low = 0, High = 10 Mid = (0+10)//2 = 5 → list[5] = 18 → 33 > 18 → search right half Low = 6, High = 10 → Mid = (6+10)//2 = 8 → list[8] = 27 → 33 > 27 Low = 9, High = 10 → Mid = (9+10)//2 = 9 → list[9] = 30 → 33 > 30 Low = 10, High = 10 → Mid = (10+10)//2 = 10 → list[10] = 33 4 comparisons made target found Low = 0, High = 10 Mid = 5 → list[5] = 18 → 5 < 18 → search left half Low = 0, High = 4 → Mid = 2 → list[2] = 9 → 5 < 9 Low = 0, High = 1 → Mid = 0 → list[0] = 3 → 5 > 3 Low = 1, High = 1 → Mid = 1 → list[1] = 6 → 5 < 6 4 comparisons made Not found Part D: "mango" Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "mango" > "grape" low = 6, high = 10 → mid = 8, list[8] = "orange" → "mango" < "orange" low = 6, high = 7 → mid = 6, list[6] = "kiwi" → "mango" > "kiwi" low = 7, high = 7 → mid = 7, list[7] = "mango" → ✅ Found! 4 Comparisons Found "carrot" Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "carrot" < "grape" low = 0, high = 4 → mid = 2, list[2] = "carrot" 2 comparisons found "lemon" (not in list) Initial: low = 0, high = 10 mid = 5, list[5] = "grape" → "lemon" > "grape" low = 6, high = 10 → mid = 8, list[8] = "orange" → "lemon" < "orange" low = 6, high = 7 → mid = 6, list[6] = "kiwi" → "lemon" > "kiwi" low = 7, high = 7 → mid = 7, list[7] = "mango" → "lemon" < "mango" FRQS: Why is binary search more efficient for large data than linear search? - Binary search is more efficient because it repeatedly cuts the data in half, instead of having to search through every item. It is a lot easier to split the book in half and then go either left or right from that point than to read through every single word. What happens if the list isn’t sorted and you try to use binary search? - If the list isn't stored then the binary search would not work and the algorithm would likely return the false target or fail to return. Could you use binary search in a video game leaderboard or streaming service search bar? Why or why not? - Yes, you could. Because the leaderboard scores are sorted, it is efficient to use binary search. Video games have both sorted and large amounts of data making it applicable. However, streaming services have data tat is unsorted and randomized which makes binary search inadequate. Lists and Algorithns: A list is an ordered sequence of elements. The use of lists allows multiple related items to be represented using a single variable. Popcorn Hack #1: What are some possible benefits of using lists? Multiple items can be represented under a single variable. ✅ Store lots of data in one place - ✅ Access each item individually - ✅ Filter, sort, and organize that data Example is a spotify playlist So create a list you can: List1 = ["Ford", "Ferrari", 1922] To access it: cars = ["Jaguar", "Ford", "Kia"] print(cars[0]) # Output: apple print(cars[1]) # Output: banana Modifying lists: cars[1] = "Rivian" print(cars) Adding Elements to a List You can add elements to a list in two main ways: append(): Adds an item to the end of the list. insert(index, item): Adds an item at a specific position in the list. Removing Elements from a list animals = ["cat", "dog", "fish"] animals.pop(1) # removes "dog" print(animals) ['cat', 'fish'] Slicing up a list numbers = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] first_five = numbers[0:5] print(first_five) Popcorn Hack#2 What does this code output? items = ["pen", "pencil", "marker", "eraser"] items.remove("pencil") items.append("sharpener") print(items[2]) Its output is marker (0,1,2) Traversing a list means going through each item one by one using a loop. Traversing lists are a key factor in creating filtering algorithms. colors = ["red", "blue", "green", "yellow"] for color in colors: print("Color:", color) Filtering Algorithim College Board states that an algorithim is “a finite set of instructions that accomplish a specific task.” They also say that “Filtering algorithims are important tools for finding information and recognizing patterns in data.” Popcorn Hack 3: What are some real world examples of filtering algorithms? In the inbox, unread emails are bolded

      Cookie Instructions: Chocolate chip cookies are a timeless favorite, known for their soft, chewy texture and sweet, buttery flavor. Studded with rich, melty chocolate chips, they offer a delightful contrast between the slightly crisp edges and the gooey center. They’re a classic dessert that never goes out of style.






      Chocolate Cookie
      Classic Chocolate Chip Recipe

      Above are two recipies and baking instructions for two types of cookies. For chocolate lovers, this recipe includes cocoa powder in the dough for an extra rich, chocolatey experience. The cookies come out soft and decadent, with an irresistible fudgy taste. Step-by-step guidance on mixing and baking ensures you get perfect cookies every time. For the classic chocolate chip, the recipe offers the perfect balance of crispy edges and a chewy center, made with simple ingredients like butter, sugar, eggs, and semi-sweet chocolate chips. The instructions provide tips on achieving that ideal texture and flavor, including chilling the dough for a more intense cookie.