CSP study guide #2
Rin doesn't want her parents to read her letters to her sister, so she uses a Vigenère cipher to make the letters secret. Her process: 1. Rin shares the key ("BANANA") with her sister. 2. Using the key, Rin turns the message "Ice cream time" into "Jcr ceebm gize". 3. Rin sends a letter with "Jcr ceebm gize" to her sister. 4. Using the key, her sister turns the message "Jcr ceebm gize" back into "Ice cream time". What is an appropriate label for each step?
1. Key-sharing 2. Encryption 3. Communication 4. Decryption
A game programmer uses this nested conditional in their online Four Square game. IF (mouseX < 200 AND mouseY < 200) { currentSquare ← 1 } ELSE { IF (mouseX > 200 AND mouseY < 200) { currentSquare ← 4 } ELSE { IF (mouseX < 200 AND mouseY > 200) { currentSquare ← 2 } ELSE { IF (mouseX > 200 AND mouseY > 200) { currentSquare ← 3 } } }} When mouseX is 173 and mouseY is 271, what will be the value of currentSquare?
2
Aleena is developing a program to track her weekly fitness routine. Here is a part of her program that sets up some variables: type ← "swimming" day ← "wednesday" duration ← 50 laps ← 20 location ← "YMCA" How many string variables is this code storing?
3
What is a benefit of procedures in programming?
Programmers can write more organized programs by using procedures for repetitive code.
______________________ is a language that represents concepts across programming languages, but cannot actually be run by a computer.
Pseudocode
Kash is writing code to calculate formulas from his physics class. He's currently working on a procedure to calculate acceleration, based on this formula: Acceleration = Force / Mass What is the best procedure for calculating and displaying acceleration?
PROCEDURE calcAcceleration (force, mass) { DISPLAY (force/mass) }
Evelyn is making a race car simulation program. She accidentally gave two of her variables the same name: t ← 0 t ← 60 What will be the value of t after this code runs?
60
This code snippet stores and updates a list of high scores for a video game: highScores ← [750, 737, 714, 672, 655, 634, 629, 618, 615, 610] DISPLAY(highScores[5]) INSERT(highScores, 5, 668) INSERT(highScores, 2, 747) REMOVE(highScores, 12) REMOVE(highScores, 11) DISPLAY(highScores[5]) What does this program output to the display?
655 672
The following numbers are displayed by a program: 2 4 6 8 The program code is shown below, but it is missing three values: <COUNTER>, <AMOUNT>, and <STEP>. i ← <COUNTER> REPEAT <AMOUNT> TIMES { DISPLAY(i * 2) i ← i + <STEP> } Given the displayed output, what must the missing values be?
<COUNTER> = 1, <AMOUNT> = 4, <STEP> = 1
______________ ______________ protects an individual computer by constantly scanning files and identifying malware.
Antivirus software
In April 2020, Twitter users started a trend of posting their high school graduation photos. The FBI issued a warning soon after about the risks of posting those photos on public social media accounts. Which of these is NOT a potential risk of posting an old graduation photo? A. A prankster could photoshop the photo to make it look as if the user is engaging in an illegal activity. B. An attacker could download the image and threaten to share it with the press unless the user gives them money. C. A stalker could extract geolocation from the photo to locate the user. D. An attacker could use information from the graduation photo to steal a user's identity.
B. An attacker could download the image and threaten to share it with the press unless the user gives them money.
In 2013, Chicago entrepreneurs released a mobile application called Crowdfynd. People who lost items could post information on the application (description, photo, approximate location), and other people could post any items they found. Which scenario would be least likely to threaten the usefulness of the crowdfinding application? A. If many users of the application were people who wanted to steal lost items. B. If some users of the application were people who just wanted to see what items were lost and found. C. If the only users of the application were people who had found items. D. If the only users of the application were people who had lost items.
B. If some users of the application were people who just wanted to see what items were lost and found.
______________ ______________enables us to create things together online.
Collaborative software
An advertisement company builds a profile of a user based on their browsing history across many websites and uses that profile to create more targeted advertisements. Which technology enables the company to aggregate the user's browsing history across multiple sites?
Cookies
_____________________________ is a way to take advantage of the large network of potential contributors online and funnel their resources into an output.
Crowdsourcing
A ____________________ , also known as a public key certificate or identity certificate, proves the ownership of an encryption key.
Digital certificate
Evelyn receives an email that claims to be from the IRS, the United States Internal Revenue Service. The email states that their tax refund is ready and includes an attachment labeled "taxrefund.doc". Evelyn is eager for their refund but worried the email is a phishing scam. What is the safest next step?
Evelyn can find the official IRS website by searching the Web and contact IRS through a listed email address to inquire about the email.
An _________ _________ is a small amount of text that helps a website track information about a user across multiple pages of the website and personalize the user's experience on the website.
HTTP cookie
Andy is using machine learning for an algorithm that classifies photos of restaurant meals by category (such as "sandwich", "curry", or "salad"). He trains a neural network on a large open database of photos of restaurant meals. He then tests the network on local restaurants and notices that the Ethiopian restaurant meals aren't classified correctly. What's the best way to improve the machine learning algorithm's ability to recognize Ethiopian meals?
He can add Ethiopian meals to the training data set, by finding photos online, crowd-sourcing, or taking them himself.
_____________ _____________ is the idea that more than one expression can have the same meaning, but have a different form
Logical equivalence
In what way is multi-factor authentication (MFA) more secure than a password?
MFA adds an additional level of security for an attacker to break through.
________________ ________________ is a type of algorithm that automatically improves itself based on experience, not by a programmer writing a better algorithm.
Machine learning (ML)
__________________ is malicious software that's unknowingly installed onto a computer. Once installed, malware often tries to steal personal data or make money off of the user.
Malware
_______________ ________________________ (_____) requires a user to present evidence from multiple distinct factors (e.g. something you know and something you have) to gain access to a system.
Multi-factor authentication (MFA)
What expression is equivalent to this one? days ≥ 365
NOT (days < 365)
Consider the pseudocode: userType = "power" AND age ≤ 10 What is equivalent?
NOT (userType ≠ "power" OR age > 10)
In symmetric encryption, how many keys are needed to encrypt the data between a sender to a receiver?
One key: the same key is used for encryption and decryption, and that key is shared between the sender and receiver
Decryption.
Recovering the original data from scrambled data by using the secret key.
Encryption.
Scrambling the data according to a secret key.
The administration of a high school decides to install antivirus software on all of the school computers. What can the antivirus software protect the computers from?
The antivirus software can protect the computers from any malware that it is able to successfully detect.
hmad is a graphic artist. He tweets a photo of his high school yearbook cover that he helped design. In what ways can the tweeted photo be used as PII?
The high school name indicates where Ahmad went to school.
An account is protected by multi-factor authentication with these two-factors: An alphanumeric password A code generated by a hardware device What would attackers have to steal to break in?
The password and the hardware device
Shameeka is setting up a computing system for predicting earthquakes based on processing data from seismographs (devices that record earth movements). The system will start off with data from local seismographs but eventually handle millions of data points from seismographs worldwide. For her system to work well, what is an important feature?
The system must be scalable.
True/False: Personally identifiable information (or PII) refers to data that can directly or indirectly identify individuals.
True
Joaquin needs to use online banking to transfer large amounts of money and is concerned about an attacker using a rogue access point to intercept his bank transfer. What's the best way for him to avoid the risks of a rogue access point?
Use a wired connection instead of a wireless connection.
Secure web browsing relies on a trust model to verify the authenticity of digital certificates. What is the best describe the trust model involved? An arrow from one entity to another signifies that the first entity trusts the second.
User → Browser → Certificate Authority → Website
The Chicago Police Department uses a database to keep track of reported crimes. After anonymizing the data, they make it freely available online. Here's what the the crime data set includes: The date of the crime The address (block level) The type of crime (theft/battery/robbery/assault/etc.) The location type (street/residence/business/etc.) Whether an arrest was made (true/false) What questions can be answered using the available data?
What type of crime was the most common for each year in the data set? Which month has the most number of robberies? What was the average number of crimes committed per location type?
A team of songwriters is working on song lyrics together for a pop star. They're trying to decide between two ways of working: Working on documents in a desktop text editing application and emailing their latest version of the document after editing them. Using an online collaborative text editor with real-time updates and revision history. What is a benefit of using the online collaborative text editor?
With the online collaborative text editor, they can iterate more quickly on the lyrics and even edit at the same time.
an asymmetric encryption is any technique that uses __________ keys for encryption and decryption
different
In 2016, the ACLU reported that a company called Geofeedia analyzed data from social media websites like Twitter and Instagram to find users involved in local protests and sold that data to police forces. The data included usernames and their approximate geographic locations. Geofeedia claims the data was all publicly available data. In response to the news, many users were eager to find ways to keep their geolocation private. Which of these actions is least likely to help a user keep their geolocation private? a. Using a VPN (Virtual Private Network) to mask their IP while browsing the web. b. Removing location information from their profile. c. Stripping metadata from their photos before uploading them. d. Refusing to grant access to websites asking for their geolocation. e. Disabling third-party cookies in their browser.
e. Disabling third-party cookies in their browser.
Consider the pseudocode: NOT (lightOn AND NOT doorClosed) Assume that: lightOn is logically equivalent to NOT lightOff doorClosed is logically equivalent to NOT doorOpened What pseudo code is equivalent:
lightOff OR doorClosed
Greg is hosting a chocolate tasting night for his friends to taste chocolate truffles. He's writing a program to help him plan the festivities. The box of chocolates comes with 35 truffles, and there will be 6 people at the party. numChocolates ← 35 numPeople ← 6 Greg is going to distribute the truffles evenly and then save the extras for himself. What line of code successfully calculates and stores the number of extra truffles?
numExtras ← numChocolates MOD numPeople
Laquan is writing a program to calculate the perimeter of a rectangle, based on this formula: P = 2l + 2w The program starts with this code: length ← 120 width ← 13 What lines of code successfully calculate the perimeter?
perimeter ← (2 * length) + (2 * width) Or perimeter ← 2 * length + 2 * width
A ___________ __________ is an attempt to trick a user into divulging their private information.
phishing attack
A(n) ___________ is a low-power device that can detect some aspect of its environment and send the data to another device.
sensor