Summary | Effects | Digital Divide | Computing Bias | Crowdsourcing | Legal/Ethical Concerns | Safe Computing |
Binary Search Algorithm | Lists and Filtering Algorithm | Simulation/Games and Random Algorithms | Big O and Algorithm Efficiency | Binary Base 2 Math + Logic Gates | Color Codes/Images/Base64 | Relevancy |
Safe Computing
Safe Computing Notes and Homework
Popcorn Hack 1: Cookies
Open Developer Tools(fn + F12 -> Application -> Cookies)
Find cookie from one site and find:
Name, Value, Expiration Date
Where the cookie came from(See if you can figure out which category that is)
Popcorn Hack 2: CAPTCHA
row 1, column 3
row 2, column 2
row 2, column 3
Homework Hack 1: MCQ See Google form submission
Homework Hack 2
Here is a simple code for encrypting characters or words (run in notebook to show output)
import random
def caesar_cipher(text, shift, mode):
result = ""
for char in text:
if char.isalpha(): # Encrypts only 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 # Keeps spaces and punctuation unchanged
return result
# Get user input
mode = input("Do you want to encrypt or decrypt? ").strip().lower()
message = input("Enter your message: ")
shift_input = input("Enter shift value (or type 'random'): ").strip().lower()
# Generate a random shift if "random" is entered
shift = random.randint(1, 25) if shift_input == "random" else int(shift_input)
print(f"Using shift value: {shift}") # Display the shift used
output = caesar_cipher(message, shift, mode)
print(f"Result: {output}")