AP CSP PRACTICE TEST WRONG ANSWERS

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

The following table shows the value of expression based on the values of input1 and input2. V of input1 V of input2 V of expression true true false true false true false true true false false true Which of the following expressions are equivalent to the value of expression as shown in the table? Select two answers. 1. (NOT input1) OR (NOT input2) 2. (NOT input1) AND (NOT input2) 3. NOT (input1 OR input2) 4. NOT (input1 AND input2)

1. (NOT input1) OR (NOT input2) Correct. When input1 and input2 are both true, the expressions (NOT input1) and (NOT input2) are both false, so (NOT input1) OR (NOT input2) will evaluate to false. In all other cases, either (NOT input1) or (NOT input2) (or both) will evaluate to true, so (NOT input1) OR (NOT input2) will evaluate to true. 4. NOT (input1 AND input2) Correct. When input1 and input2 are both true, the expression (input1 AND input2) is true, so NOT (input1 AND input2) will evaluate to false. In all other cases, (input1 AND input2) will evaluate to false, so NOT (input1 AND input2) will evaluate to true.

Which of the following are ways in which a programmer can use abstraction to manage the complexity of a program? Select two answers. 1. Replacing each instance of repeated code with a call to a procedure 2. Replacing longer variable names with shorter variable names to reduce typing errors 3. Replacing several lines of documentation with a single line of documentation 4. Replacing several lines of documentation with a single line of documentation, name1, name2, name3, and name4 with a list of strings called name.

1. Replacing each instance of repeated code with a call to a procedure This option is correct. Placing repeated code with procedure calls is an example of a procedural abstraction that may make it easier for a programmer to manage the complexity of a program. 4. Replacing several lines of documentation with a single line of documentation, name1, name2, name3, and name4 with a list of strings called name. This option is correct. Creating a list of names is an example of a data abstraction that may make it easier for a programmer to manage the complexity of a program.

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. Process Execution Time onEither Processor P 30 seconds Q 10 seconds R 20 seconds S 15 seconds Which of the following parallel computing solutions would minimize the amount of time it takes to execute all four processes? 1. Running processes P and Q on one processor and processes R and S on the other processor 2. Running processes P and R on one processor and processes Q and S on the other processor 3. Running processes P and S on one processor and processes Q and R on the other processor 4. Running process P on one processor and processes Q, R, and S on the other processor

1. Running processes P and Q on one processor and processes R and S on the other processor Correct. With two processors running in parallel, execution time is minimized when the processors take on as close to an equal workload as possible. Running processes P and Q on one processor will take a total of 40 seconds. Running processes R and S on the other processor will take a total of 35 seconds. As the processors run in parallel, all four operations are completed in 40 seconds.

A video-streaming Web site keeps count of the number of times each video has been played since it was first added to the site. The count is updated each time a video is played and is displayed next to each video to show its popularity. At one time, the count for the most popular video was about two million. Sometime later, the same video displayed a seven-digit negative number as its count, while the counts for the other videos displayed correctly. Which of the following is the most likely explanation for the error? 1. The count for the video became larger than the maximum value allowed by the data type used to store the count. 2. The mathematical operations used to calculate the count caused a rounding error to occur. 3. The software used to update the count failed when too many videos were played simultaneously by too many users. 4. The software used to update the count contained a sampling error when using digital data to approximate the analog count.

1. The count for the video became larger than the maximum value allowed by the data type used to store the count. Correct. This situation is consistent with the behavior of an overflow error. When the value of the count exceeded the maximum value that can be represented by a fixed number of bits, the count overflowed and wrapped around to a negative number.

FIRST = 100 SECOND = 200 TEMP = FIRST SECOND = TEMP FIRST = SECOND what is the value of FIRST and SECOND:

100,100

A certain social media application is popular with people across the United States. The developers of the application are updating the algorithm used by the application to introduce a new feature that allows users of the application with similar interests to connect with one another. Which of the following strategies is LEAST likely to introduce bias into the application? 1. Enticing users to spend more time using the application by providing the updated algorithm for users who use the application at least ten hours per week 2. Inviting a random sample of all users to try out the new algorithm and provide feedback before it is released to a wider audience 3. Providing the updated algorithm only to teenage users to generate excitement about the new feature 4. Testing the updated algorithm with a small number of users in the city where the developers are located so that immediate feedback can be gathered

2. Inviting a random sample of all users to try out the new algorithm and provide feedback before it is released to a wider audience Correct. Testing the updated algorithm with a small number of users in the city where the developers are located so that immediate feedback can be gathered

Which of the following statements correctly explain how the Internet is able to facilitate communication at a large scale? I. A central monitoring computer is used to track and maintain the connections of the Internet. II. Data is routed between points in multiple ways so that if a connection fails, the data can be rerouted around the inoperative connections. III. Protocols for packets and routing are used so that computers from different manufacturers can communicate in a standard way. 1. I and II only 2. I and III only 3. II and III only 4. I, II, and III

3. II and III only Correct. Statement I is false. The Internet is not controlled from a central device. Statements II and III are true. The Internet uses redundant routing to support fault tolerance. The Internet uses protocols so that data is transmitted in a standard format.

Internet protocol version 4 (IPv4) represents each IP address as a 32-bit binary number. Internet protocol version 6 (IPv6) represents each IP address as a 128-bit binary number. Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses? 1. 4 times as many addresses are available. 2. 96 times as many addresses are available. 3. 2^4 times as many addresses are available. 4. 2^96 times as many addresses are available.

4. 2^96 times as many addresses are available. This option is correct. With 32-bit addressing, IPv4 has possible addresses. With 128-bit addressing, IPv6 has possible addresses. Since , IPv6 has times as many possible addresses as IPv4.

Which of the following best explains how a certificate authority is used in protecting data? 1. A certificate authority certifies the safety of a particular Web site so that users know that it does not contain any viruses. 2. A certificate authority issues passwords that grant access to secure databases. 3. A certificate authority maintains a secure database that maps all Web domain names to the IP addresses of the servers where the sites are hosted. 4. A certificate authority verifies the authenticity of encryption keys used in secured communications.

4. A certificate authority verifies the authenticity of encryption keys used in secured communications. Correct. Certificate authorities are entities that issue digital certificates, which are used to certify the ownership of public keys.

A list of binary values (0 or 1) is used to represent a black-and-white image. Which of the following is LEAST likely to be stored as metadata associated with the image? 1. Copyright information for the image 2. The date and time the image was created 3. The dimensions (number of rows and columns of pixels) of the image 4. A duplicate copy of the data

4. A duplicate copy of the data Correct. Metadata typically consists of descriptive information about the data, not a copy of the data itself.

Which of the following actions could be used to help reduce the digital divide? I. Providing free education and training on how to use computing devices II. Providing free or low-cost computing devices to low-income individuals III. Providing networks and infrastructure to people in remote areas 1. III only 2. I and II only 3. II and III only 4. I, II, and III

4. I, II, and III This option is correct. Free education and training would address digital literacy. Providing free or low-cost devices would address a lack of access to devices. Providing networks and infrastructure would address a lack of access to networks.

Which of the following best describes one of the benefits of using an iterative and incremental process of program development? 1. It allows programmers to implement algorithmic solutions to otherwise unsolvable problems. 2. It eliminates the need for programmers to test completed programs. 3. It enables programmers to create programs that use the lowest-level abstractions available. 4. It helps programmers identify errors as components are added to a working program.

4. It helps programmers identify errors as components are added to a working program. This option is correct. Incrementally adding code segments to correct, working programs can help programmers identify new errors that are introduced.

Which of the following best explains the relationship between the Internet and the World Wide Web? 1. Both the Internet and the World Wide Web refer to the same interconnected network of devices. 2. The Internet is an interconnected network of data servers, and the World Wide Web is a network of user devices that communicates with the data servers. 3. The Internet is a local network of interconnected devices, and the World Wide Web is a global network that connects the local networks with each other. 4. The Internet is a network of interconnected networks, and the World Wide Web is a system of linked pages, programs, and files that is accessed via the Internet.

4. The Internet is a network of interconnected networks, and the World Wide Web is a system of linked pages, programs, and files that is accessed via the Internet. Correct. The Internet is the global system of interconnected computer networks that uses protocols to connect devices worldwide. The World Wide Web is an information system (of pages, programs, and files) that is accessible over the Internet.

Which of the following best describes a challenge involved in using a parallel computing solution? 1. A parallel computing solution may not be appropriate for an algorithm in which each step requires the output from the preceding step. 2. A parallel computing solution may not be appropriate for an algorithm in which the same formula is applied to many numeric data elements. 3. A parallel computing solution may not be appropriate for an algorithm that can be easily broken down into small independent tasks. 4. A parallel computing solution may not be appropriate for an algorithm that searches for occurrences of a key word in a large number of documents.

A parallel computing solution may not be appropriate for an algorithm in which each step requires the output from the preceding step. Correct. The efficiency of a parallel computing solution is limited by the sequential portion of the solution. If each step is dependent on the preceding step, then each step must wait for the previous step to complete before executing. Therefore, the solution is completely sequential and does not benefit from parallel computing.

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? 1. Internet users with a copy of the information might redistribute the personal information without first seeking permission. 2. There are potentially an extremely large number of devices on the Internet that may contain the information. 3. Automated technologies collect information about Internet users without their knowledge. 4. All personal information is stored online using authentication measures, making the information hard to access.

All personal information is stored online using authentication measures, making the information hard to access. Correct. Personal information can be found in a variety of places where authentication measures may not be used, including social media sites. Personal information placed online can be collected, aggregated, distributed, and exploited.

Which of the following research proposals is most likely to be successful as a citizen science project? 1. Collecting pictures of birds from around the world that can then be analyzed to determine how location affects bird size 2. Monitoring a group of cells in a laboratory to determine how growth rate is affected by exposure to varying temperatures 3. Using a simulation to determine which one from a set of chemicals causes the most significant change to local animal and plant life 4. Using specialized equipment to perform three-dimensional scans of complex proteins found in human cells

Collecting pictures of birds from around the world that can then be analyzed to determine how location affects bird size Correct. Citizen science is scientific research conducted in whole or part by distributed individuals, many of whom may not be scientists, who contribute relevant data to research using their own computing devices. This project would benefit from using a citizen science model for gathering photographs of birds from amateur photographers around the world.

A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements. Line 1: PROCEDURE isIncreasing(numberList) Line 2: { Line 3: count ←← 2 Line 4: REPEAT UNTIL(count > LENGTH(numberList)) Line 5: { Line 6: IF(numberList[count] < numberList[count - 1]) Line 7: { Line 8: RETURN(true) Line 9: } Line 10: count ←← count + 1 Line 11: } Line 12: RETURN(false) Line 13: } Which of the following changes is needed for the program to work as intended?

Lines 8 and 12 should be interchanged.

Which of the following statements about the Internet is true?

The Internet is designed to scale to support an increasing number of users. Correct. The Internet was designed to be scalable, using open protocols to easily connect additional computing devices to the network.

A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing the program, a software developer discovers that some values appear to be mathematically imprecise. Which of the following is the most likely cause of the imprecision? 1. The account balances are represented using a fixed number of bits, resulting in overflow errors. 2. The account balances are represented using a fixed number of bits, resulting in round-off errors. 3. The account balances are represented using an unlimited number of bits, resulting in overflow errors. 4. The account balances are represented using an unlimited number of bits, resulting in round-off errors.

The account balances are represented using a fixed number of bits, resulting in round-off errors. Correct. The fixed number of bits used to represent real numbers limits the range of these values; this limitation can result in round-off errors. Round-off errors typically result in imprecise values or results.

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

When the solution to the problem requires real-world data inputs that are continually measured at regular intervals. Correct. Simulations are most useful when real-world events are impractical. A simulation is unlikely to be appropriate if continuous real-world data is needed.


Conjuntos de estudio relacionados

Romeo and Juliet: Act 3-5 Questions

View Set

SAS Certification Prep Guide: Base Programming

View Set

Defensive driving at defensivedriving.com

View Set

C393 CompTIA A+ Core 1 All Topics

View Set

MCAT Discrete Practice Questions

View Set

Sport Management: Test 1 (Chapters 1-5)

View Set

State and Local Government Final

View Set

Drugs for Angina Pectoris & Management of STEMI

View Set

Live Virtual Machine Lab 2.1: Module 02 Defining Networking Devices

View Set