College Board MCQ
Corrections: #26: Directions: The question or incomplete statement below is followed by four suggested answers or completions. Select the one that is best in each case.
The grid below contains a robot represented as a triangle, initially facing up. The robot can move into a white or gray square but cannot move into a black region.
Correct Answer: B
The Code I contributed
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="twitter:card" content="summary_large_image" /><!-- Begin Jekyll SEO tag v2.8.0 -->
<title>Cryptosolutions123 | N@tm project. Hayden, Shuban, Tarun, Deva</title>
<meta name="generator" content="Jekyll v3.9.3" />
<meta property="og:title" content="Cryptosolutions123" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="N@tm project. Hayden, Shuban, Tarun, Deva" />
<meta property="og:description" content="N@tm project. Hayden, Shuban, Tarun, Deva" />
<link rel="canonical" href="http://localhost:4100/Cryptosolutions123/" />
<meta property="og:url" content="http://localhost:4100/Passion-Project/" />
<meta property="og:site_name" content="Cryptosolutions123" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="Passion-Project" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","description":"N@tm project. Hayden, Shuban, Tarun, Deva","headline":"Passion-Project","name":"Passion-Project","url":"http://localhost:4100/Passion-Project/"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="assets/css/style.css">
<link type="application/atom+xml" rel="alternate" href="http://localhost:4100/Passion-Project/feed.xml" title="Passion-Project" />
<link rel="shortcut icon" type="image/x-icon" href="/Passion-Project/images/favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Primer/15.2.0/primer.css" integrity="sha512-xTz2ys4coGAOz8vuV1NcQBkgVmKhsSEtjbqyMJbBHRplFuvKIUo6xhLHpAyPt9mfR6twHJgn9OgVLuqOvjeBhg==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<script>
function wrap_img(fn) {
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading") {
var elements = document.querySelectorAll(".post img");
Array.prototype.forEach.call(elements, function(el, i) {
if (el.getAttribute("title") && (el.className != "emoji")) {
const caption = document.createElement('figcaption');
var node = document.createTextNode(el.getAttribute("title"));
caption.appendChild(node);
const wrapper = document.createElement('figure');
wrapper.className = 'image';
el.parentNode.insertBefore(wrapper, el);
el.parentNode.removeChild(el);
wrapper.appendChild(el);
wrapper.appendChild(caption);
}
});
} else { document.addEventListener('DOMContentLoaded', fn); }
}
window.onload = wrap_img;
</script>
<script>
document.addEventListener("DOMContentLoaded", function(){
// add link icon to anchor tags
var elem = document.querySelectorAll(".anchor-link")
elem.forEach(e => (e.innerHTML = '<i class="fas fa-link fa-xs"></i>'));
});
</script>
<style>
/* Styles for the body */
body {
font-family: Monospace, sans-serif;
padding: 20px;
}
/* Styles for h2 elements */
h2 {
color: #333366;
margin-bottom: 20px;
}
/* Styles for p elements */
p {
color: #666666;
}
/* Styles for buttons */
button {
background-color: #4CAF50; /* Green */
color: white;
padding: 15px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #45a049 !important;
transform: scale(1.1);
transition: transform 0.3s ease;
}
/* Styles for the #firstSection */
#firstSection {
background-color: #f2f2f2;
padding: 20px;
border-radius: 4px;
margin-bottom: 20px;
}
@keyframes colorChange {
0% { color: black; }
50% { color: grey; }
100% { color: black; }
}
#firstText {
animation: colorChange 2s infinite;
}
#firstSection {
text-align: center;
padding: 50px;
border: 1px solid #ccc;
margin: 20px auto;
width: 400px;
}
#button1 {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
box-shadow: 0 0 10px rgba(255, 100, 255, 0.87);
}
#home
{
display: grid;
grid-template-columns: repeat(2,1fr);
}
.cryptWrapper
{
padding: 20%;
height:auto;
gap:30%;
text-shadow: 0 0 100px rgba(90, 70, 202, 0.87);
margin-right: 110px;
box-shadow: 0 0 10px rgba(116, 46, 255, 0.627);
width: 100%;
}
.cryptInput
{
width:100%;
height:150px;
text-align: start;
resize: none;
box-shadow: 0 0 20px rgba(83, 39, 205, 0.87);
}
.cryptButton
{
position: relative;
left:25%;
top:1%;
background-color: rgb(0, 00, 0) !important;
box-shadow: 0 0 10px rgba(100, 255, 118, 0.87);
}
.cryptButton:active
{
filter: brightness(50%);
}
#decryptButton
{
position: relative;
top:6%;
left:25%;
box-shadow: 0 0 10px rgba(100, 255, 118, 0.87);
}
#decryptOutput
{
position: relative;
top:5.5%;
}
#Ban
{
position:fixed;
left:0%;
top:15%;
}
#Mynavbar
{
box-shadow: 0 0 10px rgba(100, 255, 118, 0.87);
}
.typewriter h1 {
overflow: hidden; /* Ensures the content is not revealed until the animation */
white-space: nowrap; /* Keeps the content on a single line */
margin: 0 auto; /* Gives that scrolling effect as the typing happens */
letter-spacing: .15em; /* Adjust as needed */
animation:
typing 3.5s steps(40, end),
blink-caret .75s step-end infinite;
}
/* The typing effect */
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
/* The typewriter cursor effect */
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: orange; }
}
</style>
</head>
<body>
<header class="site-header" id="Mynavbar">
<div class="wrapper"><a class="site-title" rel="author" href="/Passion-Project/">Cipher Hijinks <p> </p><nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="trigger"><a class="page-link" href="/Passion-Project/search/">Search</a><a class="page-link" href="/Passion-Project/categories/">Tags</a><a class="page-link" href="/Passion-Project/Contacts.html">Contact Us</a><a class="page-link" href="/Passion-Project/Learn.html">Learn</a></div>
</nav></div>
</header>
<main class="page-content" aria-label="Content">
<div class="wrapper">
<div id="home">
<div class="typewriter">
<h1>Encrypt</h1>
<br>
<textarea id="Encryptinput" class="cryptInput" placeholder="Type text to be encrypted"></textarea>
<br>
<label for="ciphers">Select a cipher:</label>
<select id="ciphers">
<option value="caesar">Caesar Cipher</option>
<option value="RSA">RSA</option>
<option value="hexadecimal">Hexadecimal</option>
<option value="binary">Binary</option>
<!-- <option value="substitution">Substitution</option> <input type="text" id="Encryptinput" placeholder="Type The Text You want to Encrypt" />-->
<option value="morse">morse</option>
</select>
<br>
<button class="cryptButton" onclick="Encrypt()">ENCRYPT</button>
<p id="encrypted">
Encrypted Output:
</p>
</div>
<div class="typewriter">
<h1>Decrypt</h1>
<br>
<textarea class="cryptInput" id="decryptInput" placeholder="Type text to be decrypted"></textarea>
<button class="cryptButton" onclick="Decrypt()" id="decryptButton">DECRYPT</button>
<p id="decryptOutput">
Decrypted Output:
</p>
</div>
<script>
function Decrypt() {
var inputText = document.getElementById('decryptInput').value;
fetch('http://localhost:8080/decrypt', {
method: 'POST', // or 'GET'
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({text: inputText}),
timeout: 30000,
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("decryptOutput")
txt.innerText = "Decrypted Output: "+JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
}
function Encrypt() {
console.log("Encrypt function called");
const dropdown = document.getElementById("ciphers");
const selectedCipher = document.getElementById("ciphers");
// Get the input text outside the switch statement
var inputText = document.getElementById('Encryptinput').value;
// Depending on the selected option, interact with different backends
const selectedOption = dropdown.value;
//selectedCipher.textContent = selectedOption;
switch (selectedOption) {
case "caesar": // Ceasar Encryption making connection to backend
console.log("Encrypt caesar function called");
fetch('http://localhost:8080/caesarencrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText="Encrypted Output: "+ JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
case "RSA": // RSA Encryption making connection to backend
console.log("Encrypt RSA function called");
fetch('http://localhost:8080/rsaencrypt', {
method: 'POST',
timeout:100000000,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText="Encrypted Output: "+ JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
case "hexadecimal": // Hexadecimal Encryption making connection to backend
console.log("Encrypt RSA function called");
fetch('http://localhost:8080/hexencrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText="Encrypted Output: "+ JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
case "binary": // Binary Encryption making connection to backend
console.log("Encrypt RSA function called");
fetch('http://localhost:8080/binaryencrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText =JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
case "substitution":
console.log("Encrypt RSA function called");
fetch('http://localhost:8080/subencrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText="Encrypted Output: "+ JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
case "morse":
console.log("Encrypt RSA function called");
fetch('http://localhost:8080/morseencrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ text: inputText }),
})
.then(response => response.text())
.then(data => {
console.log('Success:', data);
var txt = document.getElementById("encrypted");
txt.innerText="Encrypted Output: "+ JSON.parse(data);
})
.catch(error => {
console.error('Error:', error);
});
break;
default:
// Handle any other cases or errors
break;
}
}
</script>
</body>
</html>
<!-- Hide posts if front matter flag hide:true -->
<!-- Sort posts by rank, then date -->
<!-- Assemble final sorted posts array -->
What I learned this Trimester
- collaborating with a team
- using GitHub
- HTML and some JavaScript
- Flask
Implementing the Team Teaches
import random
# Define a Book class to abstract the data for a book
class Book:
def __init__(self, title, author):
self.title = title
self.author = author
self.checked_out = False
# Define a Library class to manage a collection of books
class Library:
def __init__(self):
self.books = {} # Dictionary to store book objects with unique IDs as keys
def add_book(self, book):
book_id = len(self.books) + 1
self.books[book_id] = book
def check_out_book(self, book_id):
if book_id in self.books and not self.books[book_id].checked_out:
self.books[book_id].checked_out = True
return True
return False
def check_in_book(self, book_id):
if book_id in self.books and self.books[book_id].checked_out:
self.books[book_id].checked_out = False
return True
return False
def simulate_day(self):
# Randomly check out and check in some books
for _ in range(random.randint(1, 5)): # Simulate a random number of transactions
book_id = random.choice(list(self.books.keys()))
if self.books[book_id].checked_out:
self.check_in_book(book_id)
else:
self.check_out_book(book_id)
# Create a list of book titles and authors
book_data = [
("1984", "George Orwell"),
("To Kill a Mockingbird", "Harper Lee"),
("The Great Gatsby", "F. Scott Fitzgerald")
]
# Instantiate the Library
my_library = Library()
# Add books to the library
for title, author in book_data:
my_library.add_book(Book(title, author))
# Simulate a day in the library
my_library.simulate_day()
# Print the status of the books
for book_id, book in my_library.books.items():
status = "Checked out" if book.checked_out else "Available"
print(f"Book ID: {book_id}, Title: {book.title}, Status: {status}")
Github Peer Reviews for N@TM
Stockify
Criteria/Key Features:
Frontend
Backend
API
Database
Agile
HOOK: Points: 4.0 Reason: The front end immediately captivates with its advanced ChatGPT-enabled conversational interface and search capabilities, promising a glimpse into the future upon arrival.
KNOWLEDGE: Points: 3.75 Reason: The platform’s intelligence shines through its implementation of a conversational AI, a neural network for forecasting stock movements, and a curated selection of top stocks tailored to user preferences, though the explanation lacks technical depth.
VALUE: Points: 1.0 Reason: The tool’s practicality is undeniable, providing valuable insights into stock market analysis, a crucial aspect of contemporary finance.
WOW FACTOR: Reason: 0.94 The front end’s sophistication, coupled with personalized data storage for users, provides a remarkable and engaging user experience.
9.69/10
Spotify Search Algorithm
USAGE OF:
Frontend
Backend
API
Agile
HOOK: Points: 3.9 Reason: Purpose was clear
KNOWLEDGE: Points: 3.8 Reason: Proficient skill shown in Computer Science. Good usage of API
VALUE: Points: 0.9 Reason: The Value was less obvious but its still neat
WOW FACTOR: Points: 0.9 Reason: Spotify account authorization was unique
9.5/10
Raspberry Pi robot
Criteria/Key Features:
Frontend
Backend
API
Database
Agile
HOOK: Points: 4.0 Reason: Implementation of software into hardware is innovative, unique, and immediately attention-grabbing.
KNOWLEDGE: Points: 4.0 Reason: In-depth explanation of the code and hardware demonstrates proficiency from everybody
VALUE: Points: 0.9 Reason: The Practical applications for this project is boundless, and I can see this working in multiple industries
WOW FACTOR: Points: 1.0 Reason: Being able to control a Raspberry Pi powered robot through a web-based UI is innovative and demonstrates a great deal of technical ingenuity.
Overall Score: 9.1/10
My Goals
Next Trimester, I want to learn how to:
- Become a better backend developer
- Learn and understand deployment better
- Improve my skills in HTML
- I’ll use USACO problems to help me prepare for the AP CSP exam
- I’ll take more AP CSP practice MCQs more often. I’ll use ChatGPT to generate problems related to the AP CSP MCQs
- Making more detailed notes in the Team Teaches
What I’m Proud Of
- Learning HTML
- Solidifying my concepts in Python
- Being able to lead my team to effectively make a good passion project
My story
I remember coming into CSP very nervous because I knew nothing about website development and working with HTML to make front end. The first time I saw changes being made visibly on my website, I was very excited about what I created and I was excited about what I could potentially do later in my journey into CSP. Fast forward to N@TM, I made the frontend and provided some assistance to my backend devs as well. I learned a lot about formatting and proper markup ethics when making the front end of the code to make as user friendly as possible. Of course, the frontend was relatively basic compared to other people’s, but I’m proud of the work that I’ve done because I’ve come so far. I intend on working more in backend in Tri 2 and learning more about that as well. By the end of the year, I want to have a skill set so strong I can be considered a potential hirable canidate in a software job if I needed to. If not that, I would like to implement my skills to help me build up a business where I can generate profit from that. I’m excited to see what the future holds for me.