AP Computer Science Pluchino

Ace your homework & exams now with Quizwiz!

9. Which of the following can be represented by a sequence of 3 bits? I. The seven days of the week II. Between zero and eight pints of ice cream III. The nine innings in a standard baseball game

(A) I only

24. The figure below shows a circuit composed of two logic gates. The output of the circuit is true. Which of the following is a true statement about inputs A and B?

(B) At least one input must be true

49. How many bits are used in the address of an IPv4 packet?

(C) 32

18. Which algorithm best describes the program below? items ← 0 FOR EACH name IN nameList items ← items + 1 DISPLAY items

(C) An algorithm to find the name stored at the end of a list

35. Which one of the following is NOT a benefit of the HTTPS protocol?

(A) HTTPS ensures that only the client and the server can view the packets sent during their communication and they cannot be intercepted by a third party.

65. Which is true of abstraction?

(B) Abstraction extracts common features from specific examples to generalize concepts.

21. Consider the following algorithms to store a color digital image. Which algorithms are examples of "lossy" compression? Select two answers:

(B) The image is divided into squares that are 2 by 2 pixels each. Each square is translated into a single pixel whose color is the average of the color values from the 4 pixels in the square. (D) The algorithm translates a color image into a grayscale version of the color original storing only averages of the data used to store the original colors in the picture.

47. Which code segment will compute (and store) the product of all the numbers contained in the list, numList, assuming there is at least one item in the list?

(B) product ← 1 FOR EACH num IN numList { product ← product * num }

29. Consider the following numbers. Binary 1101 Decimal 14 Hexadecimal F Which of the following lists them from least to greatest?

(C) Binary 1101, Decimal 14, Hexadecimal F

46. Which of the following statements is NOT correct regarding abstraction as applied to computer science:

(C) Binary sequences are abstractions which are used to represent colors in an image.

60. When producing creative artifacts, designers typically:

(D) Employ an iterative process which begins with interviewing the customer then moves through a repeated process of design, implementation, and customer feedback.

10. Which type of chart would best display the individual data from 1,000 individuals' daily time spent in social media?

(D) Scatter Plot

75. What is the primary function of the Internet?

(D) To connect devices and networks all over the world.

57. How many asterisks (*) will the code below display ?

(A) Infinite

37. How many times will the following loop be executed? x ← 0 REPEAT UNTIL (x > 5) IF (x MOD 2 = 0) x ← x - 1 IF (NOT (x MOD 2) = 0) x ← x + 3

(B) 3

3. In the process of digging, a landscaping company cuts a fiber line. Transmission of Internet traffic is still possible through additional pathways that provide alternate routes between the source and destination. The additional pathways describe a concept known as:

D) redundancy

33. Which of the following is true of algorithms? Select two answers.

(A) Algorithms are composed of commands which implement sequencing, iteration, and selection by which a task can be completed on a computer. (D) Clarity and readability are important considerations when expressing an algorithm in a language.

71. The initial position is given below for a robot in a grid of squares. Code for the procedure Mystery is shown below. Assume that the parameter n is a positive integer value. Which of the following shows a possible result of calling the procedure?

(A) Arrow in the middle to the left

58. A student is gathering information for the IT department in her school over summer. She uses Google Sheets to collect data about the number of laptops and desktops,and their functional status; working or needs repair with each classroom's data on a separate sheet. What is the most efficient way to create a report for the school that needs information on the unique number of non-working laptops in each classroom?

(A) First sort by the functional status of the devices in the room. Filter the data to eliminate the working devices. Then filter by the type of device to eliminate desktop computers.

14. Imagine you are playing an online game with your friends. You are at a crucial stage in the basketball game and need just one more free throw to win the game. You see the entire complex scene display quickly. You aim at the hoop to shoot your free throw. You click the shoot button but there is a momentary freeze on your screen only to discover that you have lost the game. What is demonstrated by this situation?

(A) High bandwidth, high latency

11. An architecture company is planning to build a tower in California but they are worried about earthquakes. They decide to use a computer simulation in order to test the safety of different designs when an earthquake occurs. Which of the following are reasons to use a simulation in this context? I. Using the simulation software can save the company money because it allows them to test building materials for safety without purchasing physical materials. II. Using the simulation software will perfectly predict what will happen in the event of an earthquake. III. Using the simulation software can help ensure the safety of the building during an earthquake without endangering people.

(A) I only

27. Which of the following is NOT true regarding metadata?

(A) In photos, metadata is hidden within the image and is stripped out using pixel processing methods.

12. FOUR INDEPENDENT ALGORITHMS listed below can be executed on a row of NUMBER cards (Not FACE cards) on a table. There are an EVEN number of cards,and they are in no special order. Which of the Algorithms involves BOTH Selection and Iteration? For this question select TWO correct answers

(A) Look over all the cards to find the smallest one, and move it to the leftmost position. (C) Compare the values of each pair of cards. For example, compare cards 0 and 1, compare cards 2 and 3, and so on for all pairs. Swap positions when the first card is greater than the second of the pair.

43. You have been hired by a company to generate a simulation of a process within their multinational company. You try to convince them that there is significant value to starting with a simple model even though it might not model their process exactly. Which arguments below are viable supports for your position?

(A) Models and simulations often omit unnecessary features of the objects or phenomena under investigation. (C) Simple models and simulations will execute faster allowing more opportunity for rapid testing and development.

66. Which of the is not true when considering the impact of the Internet?

(A) The Internet has impacted the entire world equally such that all citizens of the world have equal opportunity to share the innovation it enables.

73. Two grids are shown below. Each grid contains a robot represented as a triangle. Both robots are initially facing right. Each robot can move into a white or gray square, but cannot move into a black region.) For each grid, the program below is intended to move the robot to the gray square. The program uses the procedure Home(), which evaluates to true if the robot is in the gray square and evaluates to false otherwise. REPEAT UNTIL (Home ()) { IF (CAN_MOVE (right)) { ROTATE_RIGHT () } ELSE { IF (CAN_MOVE (left)) { ROTATE_LEFT () } } IF (CAN_MOVE (forward)) { MOVE_FORWARD () } } For which grid(s) does the program correctly move the robot to the gray square?

(A) The grid on the left.

39. Consider the following program code. Which of the following best describes the result of running the program code?

(A) The index of the largest number in list is displayed

70. The procedure Move(distance) is used in conjunction with Turn(angle)to draw a shape. The parameter distance can be any positive integer. The parameter angle can be any integer between 0 and 360, inclusive. Consider the following program, where the cursor starts at the center of the screen. Insert image here (otherwise delete) Move (100) Turn (120) Move (100) Turn (120) Move (100) Turn (120) Move (100) Turn (120) Which of the following represents the figure that is drawn by the program?

(A) Triangle

6. What is a disadvantage of the open standard of Internet addressing and routing? Select two answers.

(A) censorship (B) possibility of denial of service attacks

72. The procedure Move(distance) is used in conjunction with Turn(angle) to complete the desired task. The parameter distance is an integer. The parameter angle is any integer from 0 to 360. Given the following code snippet, the parameter num_times could be replaced with what value(s) in order to produce a square? (Select 2)

(B) 4 (C) 5

38. Which two of the following statements are true about routing on the Internet? Select two answers.

(B) A packet travelling between two computers on the Internet may be rerouted many times along the way. (C) A packet contains addressing information to allow routers to decide how best to forward along that packet towards its destination.

36. The various protocols used on the internet operate in layers in which the protocol at each layer rely on the protocols at the lower layers to do their jobs, and higher layers (higher level of abstraction) are built on top of the lower layers (lower level of abstraction). From the list provided choose the two (2) answers that correctly describe the relative levels of abstraction of the internet protocols. For example: if protocol A relies on protocol B, it means that A is a higher level of abstraction than B. Select two answers.

(B) HTTP is a higher level of abstraction than TCP/IP (C) DNS is a higher level of abstraction than TCP/IP

48. You were hired as a manager of a set of new programmers because of your experience in generating quality code. One of your new programmers brings a solution which looks nothing like what you would generate for the same problem. Which of the following might be a good next step? I. Analyze the solution for correctness and readability. II. Realize that there are multiple ways to solve most problems and work to understand this employee's solution. III. If the program includes sequence, selection, and iterative statements, assume the solution is correct and congratulate her for her outstanding contribution.

(B) I and II only

59. When using Twitter, your tweets contain certain metadata like your screen name, user ID, tweet creation date, and your location. Which of the following statements is not true when describing metadata. I. Automatically generated metadata contains more accurate information than manually created metadata II. Metadata allows users to find relevant information and discover resources. III. Metadata can be used to increase the usefulness of data by providing description of the content and context of data.

(B) I only

25. In the following code block, assume that the variables rainy and too_Cold are boolean. IF (NOT(rainy) AND NOT(too_Cold)) { DISPLAY("It's a good beach day") } Which of the following are equivalent to the above code block?

(B) IF (NOT (rainy OR too_Cold)) { DISPLAY("It's a good beach day") }

34. Since it is well known that you took AP CS Principles, your family decides to discuss the internet with you at a holiday party. I. Aunt Minnie says, "The Internet is wholly interesting because it is all about the documents and information in the documents enabling us to become smarter as a society". II. Uncle Jack says, "I love that the Internet connects all the devices such that data can be shared at the speed of light." III. Cousin Josiah comments, "Open standards have been instrumental in the growth of the Internet as multiple networks can be connected without concern so long as they implement established standards."

(B) III only

63. Arrange the following four values from smallest to largest. I. Decimal 200 II. Binary 11000011 III. Hexadecimal C0 IV. Decimal 100

(B) IV, III, II, I

54. The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially at the bottom left square facing up. The robot can move into a white or gray square, but cannot move into a black region.Which of the following code segments can be used to move the robot to the gray square? Choose two answers.

(B) REPEAT 3 TIMES { REPEAT UNTIL (CAN_MOVE(right)) { MOVE_FORWARD () } ROTATE_RIGHT () } MOVE_FORWARD () (D) num = 17 REPEAT UNTIL (num = 0) { IF( CAN_MOVE (forward) ) { MOVE_FORWARD () } ELSE { ROTATE_RIGHT () } num = num - 1 }

55. A photo editing business uses software to compress images as they are stored to a hard drive and automatically uncompress images as they opened in the photo editing software. Every photo that is saved to disk is retrieved with lower image quality as compared to the original picture. What is the most likely reason for the reduced quality?

(B) The compression software uses a lossy compression technique.

69. Modern trucks are equipped with GPS receivers connected to the cellular network. If the GPS system regularly reports the latitude/longitude of the truck, timestamp for the positional data, and truck ID, what information can the trucking company infer from processing the GPS data alone? Select two answers.

(B) The distance of the truck from the destination. (D) How long the truck has been travelling without taking the required 8-hour break.

42. Your school uses network filtering hardware and software to deny access to blacklisted websites and files. In the school's library there is a student accessing one of the blacklisted websites. Which of the following methods is the student most likely using to defeat the network filtering.

(B) The student is using a personal mobile device that is connected to the Internet through a data plan. (C) The student is using a school device that allowed the configuration of a proxy server to encrypt the data of the blacklisted website.

23. Consider the following program that is intended to calculate the sum of all items in a list: What will be the output printed if list ←[0, 5, -3, 4]?

(C) 4

13. A crime investigator is accessing an online database of crimes within a certain radius of the city center. The database contains the following information: Date of crime Name of offender Neighborhood of crime The investigator is looking for other crimes that occurred in a certain area on a certain date. Which of the following algorithms can be used to find all crimes that occurred in a certain neighborhood on a certain day? I. Make a new list by filtering the data so only the crimes from a certain neighborhood are on the list. Perform multiple binary searches to find all crimes that occurred in that neighborhood on a certain day, adding each new occurrence to a final list. II. Make a new list by filtering the data so only the crimes from a certain neighborhood are on the list. Perform multiple linear searches to find all crimes that occurred on the given day, adding each new occurrence to a final list.

(C) Algorithm II always work correctly, but Algorithm I only works correctly when the date data is sorted.

50. Which one of these would be least likely to make programming code easily modifiable in the future?

(C) Creating more procedures for the program.

67. You hired the lowest cost Internet service provider to carry your company's Internet traffic. However, upon visiting their premises you are a bit concerned about your data being read at their facility. Which statement is true concerning the security between you and others you communicate with?

(C) Encrypting the data before transmission ensures that the data cannot be read by intermediaries.

4. You decide you are going to take your internet privacy seriously. Which of the following action poses the greatest risk to your internet privacy?

(C) Encrypting your files and sharing your private key to ensure others who you choose to share files with can read them.

28. What are some of the advantages of using models and simulations to mimic a real-world process or system under study? I. Models and simulations mimic real-world events without the cost or danger of real world prototypes or testing. II. The results of models and simulations may generate new knowledge and new hypotheses related to the phenomena being modeled. III. We cannot change the model or simulation as rapidly as we can change the real-world process or system under study, therefore, it allows us to minimize iterations in a model or simulation.

(C) I and II only

15. The Domain Name System (DNS) is designed to I. Allow for nested domain naming (e.g., digitalportfolio.collegeboard.org ) II. Allow for centralized access and administration III. Use cache and redundant servers for quick matching of IP addresses to domain names IV. Use a static database for matching IP address to domain names

(C) I and III only

2. In the following code block, assume that the variables Rainy and too_cold are boolean. IF (NOT (Rainy OR too_cold)) { DISPLAY("It's a good beach day") } Which of the following are equivalent to the above code block?

(C) IF (( NOT rainy) AND (NOT tooCold)) { DISPLAY("It's a good beach day") }

51. Several of your peers have conflicting viewpoints concerning what is, and is not, a creative artifact. Which of the statements listed below will you use to settle the conflict among your peers? I. For something to be considered a creative artifact, it must include only original material generated by the creator of the artifact. II. Creative artifacts can be produced by combining existing artifacts in a new and novel way. III. Computing can facilitate the creation and modification of computational artifacts.

(C) II and III

68. Implementing procedures in a program generally considered good coding practice. Which of the following are valid explanations as to why procedures are considered good practice? I. Procedures with parameters reduce duplicated code only if loops are included in the procedure. II. Procedures can be used to implement repeated code thereby increasing readability of an overall program. III. Procedures can be tested individually before inclusion in the overall program. On average, this decreases the time spent debugging programs.

(C) II and III

8. A student is taking a survey of her class in order to determine their average hours of sleep per night. She is tracking the number of students in her class that have replied. She sees that the number of students who have replied is represented by the digits "12" but she does not remember what base she used. Which of the following are possible bases that the number 12 could be in? I. Binary (base 2) II. Decimal (base 10) III. Hexadecimal (base 16)

(C) II and III

44. Which of the following statements about data analysis and processing are considered most true given modern computing technology?

(C) Information cleansing and classification are often employed in the processing of data by which patterns can emerge. (D) Storage, processing, or curation often present significant challenge when processing large datasets.

16. The figure below shows a circuit composed of two logic gates. The output of the circuit is true.

(C) Input A can be either true or false if Input B is true

40. In the process of engineering a piece of software, which of the following statements would generally be considered to be most accurate?

(C) The end user of the software must be considered in the design, implementation, and release of the software.

17. A high school surveys all of its 1,750 students to determine the average number of hours U.S. high school students sleep per night. Which of the following is a true statement?

(C) The high school cannot draw meaningful conclusions from this data because the sample size is too small.

61. An image site (see screenshot below) holds different information inside of a server. Which of the following would be most abstract from how it is stored?

(C) The uploaded image (assume JPEG, GIF or similar format, the smiley face picture with blue spray paint around it)

64. You write a program in which the proper motions are carried out the correct number of times but they are executed in an incorrect order. This is a most likely a problem in the ________ of the program.

(C) sequencing

22. What will be displayed when the following program is executed? list ← [1, 3, 5] FOR EACH item IN list { DISPLAY (item MOD 3) }

(D) 1 0 2

62. The vice president of a technology company has a large set of files to share with multiple employees across a large geographic area. The most efficient way for the vice president to accomplish this task is to use which of the following distribution methods?

(D) A cloud based platform to distribute the files.

7. If Alice wishes to send Bob an encrypted message using public-key encryption, she should encrypt her message with ________________,

(D) Bob's public key

41. You write an algorithm in your program to that calculates and prints the total miles traveled during a road trip. When you test your algorithm, it does not print the correct value. Which of the following would NOT be a productive way to debug the code?

(D) Delete the entire algorithm and start over

56. Digital data can be compressed in order to reduce file size, and speed of transmission through a network. While some compression techniques are lossy, others preserve the original data in the compressed form. Compression techniques (lossy or lossless) can do the following, EXCEPT:

(D) Enlarge a file in order to increase the resolution in the original, thereby increasing the file size

52. When building internet networks it is important to consider redundancy. Which of the following is an example of redundancy?

(D) Ensuring that if any single node in the network were to stop working, packets can still be delivered

26. Which of the following statement about algorithmic efficiency is correct?

(D) Formal reasoning can be used to determine the efficiency of an algorithm.

45. You are given a 32-bit word which was copied from computer RAM and are asked to determine what was represented by the word. Which of the following represents the most complete response? I. The 32-bit word could be integer data as binary is how data is always represented in RAM. II. The 32-bit word could be an instruction for the CPU as hardware processes binary words. III. We cannot be certain as to what the word represented without more information.

(D) I, II and III

19. Frances wants to develop an algorithm to compute the arithmetic mean of a list of numbers. After four attempts to implement the algorithm, the following code was tested and found to correctly compute and display the total sum of all the numbers in the list. total ← 0 items ← 0 FOR EACH number IN numList { total ← total + number <MISSING CODE 1> } DISPLAY total DISPLAY items <MISSING CODE 2> Which lines of code need to be added so that the algorithm displays the arithmetic mean of the numbers in numList?

(D) Missing code 1: items ← items+1, Missing code 2: DISPLAY (total / items)

74. A website presents several different options for you to pay for your order. Which would you choose to minimize your personal cybersecurity risk?

(D) Paying for your bill using a third party, secured method like Paypal or your bank application.

32. You have been asked to create a computational artifact utilizing a set of tools which are unfamiliar to you. When creating the schedule for delivery, which would not be advised if you hope to deliver this product on time:

(D) Planning a set of sequential tasks with precise timing by which you can deliver exactly on the due date.

20. A student draws a gorgeous digital image on her school computer. She decides she wants to show her brother, so she saves it and later downloads the image onto her home computer. When she opens and resizes the image at home, the quality is noticeably inferior to the original she saved. Which of the following is a reasonable explanation for the reduced quality?

(D) The process she used to save the image utilized a "lossy" compression algorithm.

5. You are writing a function called swap (list, x, y) which will exchange the position of the two values at indexes x and y in the list. Example: before and after a call to swap (list, 2, 3) on the list shown below The function header is defined below. Choose the three lines of code that will perform the swap correctly. procedure swap (list, x, y) { <MISSING CODE> }

(D) var temp ← list[y]; list[y] ← list[x]; list[x] ← temp;

30. Which of the following is a characteristic of the fault-tolerant nature of communication on the Internet?

B. The ability to provide data transmission even when some connections have failed

31. If the post office delivered mail just as routers deliver messages on the Internet, which of the following statements would be true? Select two answers.

C. Letters would be written on the outside of envelopes for all to read instead of letters put inside envelopes. D. The mailman would sometimes take a different path to deliver each letter to your home.

53. Consider the program displayHighway(), which displays several cars on a highway. The program includes the following procedures: displayAntenna(), displayWheels() ,displayWindows(), displayCar(), displayRoad(). Which of the following is an appropriate visualization of the program's abstraction hierarchy?

displayRoad() displayCar() displayAntenna(), displayWheels() ,displayWindows()


Related study sets

Unit 7 Lesson 1 Physical and Chemical Changes

View Set

1.การทำให้ปราศจากเชื้อ

View Set

Basic learning concepts and classical conditioning; operant conditioning chapter 7

View Set

Chapter 10 - Mobile and Embedded Device Security

View Set

Nutrition Consultant Exam Chp. 4-6

View Set