AP CSP Final Review

¡Supera tus tareas y exámenes ahora con Quizwiz!

The player controls in a particular video game are represented by numbers. The controls and their corresponding binary values are shown in the following table. Jump = 11000 What is the decimal value for the jump control? A) 3 B) 12 C) 24 D) 48

24

Q16 for 21/25

A and D

Creative Commons

A collection of public copyright licenses that enable the free distribution of an otherwise copyrighted work, used when an author wants to give people the right to share, use, and build upon a work that they have created.

Intellectual Property

A work or invention that is the result of creativity, such as a piece of writing or a design, to which one has rights and for which one may apply for a patent, copyright, trademark, etc.

Which of the following best exemplifies the use of keylogging to gain unauthorized access to a computer system? A) A user unintentionally installs a program on their computer that records all user input and forwards it to another computer. A few weeks later, someone else is able to access the user's computer using the recorded data. B) A user has a very common password for an online banking account. Someone else guesses the password after a few attempts and gains access to the user's account. C) A user logs into an unsecure Web site. Someone else is able to view unencrypted log-in information as it is transmitted over the Internet. The user has the same username and password for multiple accounts, so the user's log-in information for multiple systems may be compromised. D) A user receives an e-mail that claims to be from the user's bank. The e-mail instructs the user to click on a link to a Web site and enter a username and password to verify an account. Shortly after following the steps, the user discovers that the Web site is fraudulent and that the user's username and password were stolen.

A) A user unintentionally installs a program on their computer that records all user input and forwards it to another computer. A few weeks later, someone else is able to access the user's computer using the recorded data.

Reasonable Time

Algorithms with a polynomial efficiency or lower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time.

Unreasonable Time

Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.

A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory? A) 5 B) 6 C) 7 D) 8

C) 7

first = 100 second = 200 temp = first second = temp first = second What are the values of first and second as a result of executing the code segment? A) first = 100, second = 100 B) first = 100, second = 200 C) first = 200, second = 100 D) first = 200, second = 200

C) first = 200, second = 100

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list. For example, if utensils initially contains ["fork", "spoon", "tongs", "spatula", "whisk"], it should contain ["whisk", "fork", "spoon", "tongs", "spatula"] after executing the code segment. Which of the following code segments transforms the list as intended? A) len ←← LENGTH(utensils) temp ←← utensils[len] REMOVE(utensils, len) APPEND(utensils, temp) B) len ←← LENGTH(utensils) REMOVE(utensils, len) temp ←← utensils[len] APPEND(utensils, temp) C) len ←← LENGTH(utensils) temp ←← utensils[len] REMOVE(utensils, len) INSERT(utensils, 1, temp) D) len ←← LENGTH(utensils) REMOVE(utensils, len) temp ←← utensils[len] INSERT(utensils, 1, temp)

C) len ←← LENGTH(utensils) temp ←← utensils[len] REMOVE(utensils, len) INSERT(utensils, 1, temp)

Q51 38/52

D) "daikon"

Individuals sometimes attempt to remove personal information from the Internet. Which of the following is the LEAST likely reason the personal information is hard to remove? A) Internet users with a copy of the information might redistribute the personal information without first seeking permission. B) There are potentially an extremely large number of devices on the Internet that may contain the information. C) Automated technologies collect information about Internet users without their knowledge. D) All personal information is stored online using authentication measures, making the information hard to access.

D) All personal information is stored online using authentication measures, making the information hard to access.

Which of the following best explains how devices and information can be susceptible to unauthorized access if weak passwords are used? A) Unauthorized individuals can deny service to a computing system by overwhelming the system with login attempts. B) Unauthorized individuals can exploit vulnerabilities in compression algorithms to determine a user's password from their decompressed data. C) Unauthorized individuals can exploit vulnerabilities in encryption algorithms to determine a user's password from their encryption key. D) Unauthorized individuals can use data mining and other techniques to guess a user's password.

D) Unauthorized individuals can use data mining and other techniques to guess a user's password.

A scientist wants to investigate several problems. In which of the following situations is using a simulation LEAST suitable for solving a problem? A) When a scientific study requires performing a large number of trials that need to be conducted very quickly B) When it is considered acceptable to make simplifying assumptions when modeling a real-world object or phenomenon C) When performing an experiment that would be too costly or dangerous to conduct in the real world D) When the solution to the problem requires real-world data inputs that are continually measured at regular intervals.

D) When the solution to the problem requires real-world data inputs that are continually measured at regular intervals.

HTTP

HyperText Transfer Protocol - the protocol used for transmitting web pages over the Internet

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer. I. An algorithm that accesses each element in the list twice II. An algorithm that accesses each element in the list n times III. An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list Which of the algorithms run in reasonable time?

I, II, and III

Q32 38/52

IF(CAN_MOVE(left)) { ROTATE_LEFT() } MOVE_FORWARD()

A student wants to create an algorithm that can determine, given any program and program input, whether or not the program will go into an infinite loop for that input. The problem the student is attempting to solve is considered an undecidable problem. Which of the following is true? A) It is possible to create an algorithm that will solve the problem for all programs and inputs, but the algorithm can only be implemented in a low-level programming language. B) It is possible to create an algorithm that will solve the problem for all programs and inputs, but the algorithm requires simultaneous execution on multiple CPUs. C) It is possible to create an algorithm that will solve the problem for all programs and inputs, but the algorithm will not run in reasonable time. D) It is not possible to create an algorithm that will solve the problem for all programs and inputs.

It is not possible to create an algorithm that will solve the problem for all programs and inputs.

A certain computer has two identical processors that are able to run in parallel. The following table indicates the amount of time it takes to execute each of four processes on a single processor. Assume that none of the processes is dependent on any of the other processes. Which of the following parallel computing solutions would minimize the amount of time it takes to execute all four processes? A) Running processes P and Q on one processor and processes R and S on the other processor B) Running processes P and R on one processor and processes Q and S on the other processor C) Running processes P and S on one processor and processes Q and R on the other processor D) Running process P on one processor and processes Q, R, and S on the other processor

Running processes P and Q on one processor and processes R and S on the other processor

A list of numbers has n elements, indexed from 1 to n. The following algorithm is intended to display true if the value target appears in the list more than once and to display false otherwise. The algorithm uses the variables position and count. Steps 4 and 5 are missing. Step 1:Set count to 0 and position to 1. Step 2:If the value of the element at index position is equal to target, increase the value of count by 1. Step 3:Increase the value of position by 1. Step 4:(missing step) Step 5:(missing step) Which of the following could be used to replace steps 4 and 5 so that the algorithm works as intended? A) Step 4: Repeat steps 2 and 3 until the value of position is greater than n. Step 5: If count is greater than or equal to 2, display true. Otherwise, display false. B) Step 4: Repeat steps 2 and 3 until the value of position is greater than n.Step 5: If count is greater than or equal to position, display true. Otherwise, display false. C) Step 4: Repeat steps 2 and 3 until the value of count is greater than 2. Step 5: If position is greater than or equal to n, display true. Otherwise, display false. D) Step 4: Repeat steps 2 and 3 until the value of count is greater than n. Step 5: If count is greater than or equal to 2, display true. Otherwise, display false.

Step 4: Repeat steps 2 and 3 until the value of position is greater than n. Step 5: If count is greater than or equal to 2, display true. Otherwise, display false.

An online retailer uses an algorithm to sort a list of n items by price. The table below shows the approximate number of steps the algorithm takes to sort lists of different sizes. Based on the values in the table, which of the following best characterizes the algorithm for very large values of n ? A) The algorithm runs in reasonable time. B) The algorithm runs, but not in reasonable time. C) The algorithm attempts to solve an undecidable problem. D) The algorithm attempts to find an approximate solution whenever it fails to find an exact solution.

The algorithm runs in reasonable time.

RunRoutr is a fitness tracking application for smartphones that creates suggested running routes so that users can run with each other. Upon downloading the application, each user creates a username, a personal profile, and a contact list of friends who also use the application. The application uses the smartphone's GPS unit to track a user's location, running speed, and distance traveled. Users can use the application to review information and statistics about their previous runs. At the beginning of a run, users indicate the distance they want to run from their current location, and the application suggests a running route. Once a user accepts a suggested route, the application shares the suggested route with other compatible users in the area so that they can run together. Users are considered compatible if they are on each other's contact lists or if they typically run at similar speeds. A basic RunRoutr account is free, but it displays advertisements that are targeted to individual users based on data collected by the application. For example, if a user's running route begins or ends near a particular store, the application may display an advertisement for that store. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application. Which of the following is most likely to be a data privacy concern for RunRoutr users? A) Users of the application are required to carry their smartphones with them while running in order to enable all of the application's features. B) Users of the application may have the ability to determine information about the locations of users that are not on their contact lists. C) Users of the application may not be able to accurately track their running history if they share their smartphone with another family member. D) Users of the application may not be compatible with any other users in their area.

Users of the application may have the ability to determine information about the locations of users that are not on their contact lists.

Pair Programming

a collaborative programming style in which two programmers switch between the roles of writing code and tracking or planning high level progress

Iterative Development Process

a design approach requires refinement and revision based on feedback, testing, or reflection throughout the process. This may require revisiting earlier phases of the process.

Incremental Development Process

a design approach that breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole.

Parallel Computing

a model in which programs are broken into small pieces, some of which are run simultaneously

Distributed Computing

a model in which programs are run by multiple devices

Sequential Computing:

a model in which programs run in order, one command at a time.

Undecidable Problem

a problem for which no algorithm can be constructed that is always capable of providing a correct yes-or-no answer

Binary Search

a search algorithm that starts at the middle of a sorted set of numbers and removes half of the data; this process repeats until the desired value is found or all elements have been eliminated.

Linear Search

a search algorithm which checks each element of a list, in order, until the desired value is found or all elements in the list have been checked.

Certificate authority

issue digital certificates that validate the ownership of encryption keys used in secure communications and are based on a trust model .

Q24 38/52

j = 5, k = -5

Open Access

online research output free of any and all restrictions on access and free of many restrictions on use, such as copyright or license restrictions

Open Source

programs that are made freely available and may be redistributed and modified

Heuristic

provides a "good enough" solution to a problem when an actual solution is impractical or impossible

Development process

the steps or phases used to create a piece of software. Typical phases include investigating, designing, prototyping, and testing


Conjuntos de estudio relacionados

Strategic Management Week 5 Assurance Questions

View Set

Comparative Politics Final (Quiz Questions)

View Set

ATI gas exchange and oxygenation

View Set

Learning by Teaching - The Great Courses

View Set

Photosynthesis Questions - Ch 10

View Set