APCSP mid term exam 기출문제

Ace your homework & exams now with Quizwiz!

What value would give the MoleTimer's TimerInterval property to have the Mole jump every 2 seconds? A. 2 B. 20 C. 200 D. 2000

D

Which of the following statements describes a limitation of using a computer simulation to model a real-world object or system?

Computer simulations usually make some simplifying assumptions about the real-world object or system being modeled.

An ImageSprite component can only be inserted into what other component? A. Label B. Button C. Ball D. Canvas

D

A student is recording a song on her computer. When the recording is finished, she saves a copy on her computer. The student notices that the saved copy is of lower sound quality than the original recording. Which of the following could be a possible explanation for the difference in sound quality? (2) (A) The song was saved using fewer bits per second than the original song. (B) The song was saved using more bits per second than the original song. (C) The song was saved using a lossless compression technique. (D) Some information is lost every time a file is saved from one location on a computer to another location.

(A) The song was saved using fewer bits per second than the original song.

Consider the following code segment. j=1 Repeat until <MISSING CONDITION> j=j+2 Which of the following replacements for <MISSING CONDITION> will result in an infinite loop? (A) j=6 (B) j >=6 (C) j=7 (D) j>7

(A) j=6

3. Which of the following best explains what happens when a new device is connected to the Internet? (A) A device driver is assigned to the device. (B) An Internet Protocol (IP) address is assigned to the device (C) A packet number is assigned to the device. (D) A Web site is assigned to the device.

(B) An Internet Protocol (IP) address is assigned to the device.

A programmer is writing a program that is intended to be able to process large amounts of data. Which of the following considerations is LEAST likely to affect the ability of the program to process larger data sets? (2) (A) How long the program takes to run (B) How many programming statements the program contains (C) How much memory the program requires as it runs (D) How much storage space the program requires as it runs

(B) How many programming statements the program contains

The code segment below uses the procedure IsFound (list, item), which returns true if item appears in list and returns false otherwise. The list resultList is initially empty. FOR EACH item IN inputList1 { IF (IsFound (inputList2, item) { APPEND (resultList, item) } } Which of the following best describes the contents of resultList after the code segment is executed? (2) (A) All elements in inputList1 followed by all elements in inputList2 (B) Only elements that appear in both inputList1 and inputList2 (C) Only elements that appear in either inputList1 or inputList2 but not in both lists (D) Only elements that appear in inputList1 but not in inputList2

(B) Only elements that appear in both inputList1 and inputList2

31. Digital images are often represented by the red, green, and blue values (an RGB triplet) of each individual pixel in the image. A photographer is manipulating a digital image and overwriting the original image. Which of the following describes a lossless transformation of the digital image?

(C) Creating the negative of an image by creating a new RBG triplet for each pixel in which each value is calculated by subtracting the original value from 255. The negative of an image is reversed from the original; light areas appear dark, and colors are reversed.

32. A search engine has a trend-tracking feature that provides information on how popular a search term is. The data can be filtered by geographic region, date, and category. Categories include arts and entertainment, computers and electronics, games, news people and society, shopping, sports, and travel. Which of the following questions is LEAST likely to be answerable using the trends feature?

(C) What is the cost of a certain electronics product?

30. A car manufacturer uses simulation software during the design process for a new car. Which of the following are reasons to use simulation software in this context? I. Using simulation software can save the company money by helping to compare designs early in the process, before prototype cars are built. II. Using simulation software can help identify safety issues by providing data about how different mechanical components will interact in a wide variety of situations III. The manufacturer can present simulation software to customers to demonstrate different design possibilities.

(D) I, II, and III

Which of the following statements are true about using a high-level programming language instead of a lower-level language? (2) Programs written in a high-level language are generally easier for people to read than programs written in a low-level language. A high-level language provides programmers with more abstractions than a low-level language. Programs written in a high-level language are generally easier to debug than programs written in a low-level language. (A) I only (B) I and III only (C) II and III only (D) I, II, and III

(D) I, II, and III

Which of the following is a true statement about program documentation? (A) Program documentation should not be changed after it is first written. (B) Program documentation is only needed for programs in development; it is not needed after a program is completed. (C) Program documentation is useful when programmers collaborate but not when a programmer works individually on a project. (D) Program documentation is useful during initial program development and also when modifications are made to existing programs

(D) Program documentation is useful during initial program development and also when modifications are made to existing programs

The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of determining whether the simulation resulted in an equal number of heads and tails. Step 1 : Initialize the variables heads_counterand flip_counterto 0. Step 2 : A variable coin_flipis randomlyassigned a value of either 0 or 1. If coin_fliphas the value 0, the coin flip result is heads, so heads_counteris incremented by 1. Step 3 : Increment the value of flip_counterby 1. Step 4 : Repeat steps 2 and 3 until flip_counterequals 4. Following execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails? (A) coin_flip=1 (B) flip_counter=1 (C) flip_counter=2 (D) heads_counter=2

(D) heads_counter=2

Suppose we used an Internet Addressing protocol that used 4 bits to encode a single address. With this protocol, how many devices would be able to have their own unique address?

16

A video-streaming Web site uses 32-bit integers to count the number of times each video has been played. In anticipation of some videos being played more times than can be represented with 32 bits, the Web site is planning to change to 64-bit integers for the counter. Which of the following describes the result of using 64-bit integers instead of 32-bit integers?

2^32 times as many

In the program below, y is a positive integer (e.g., 1, 2, 3...) [See image] What is the value of result after running the program?

3y (correct answer)

Why is a comment used in Visual Basic? A. Way to document your program B. To serve as a user guide C. To check logic errors D. Explain logic to users

A

Computers are often used to search through large sets of data to find useful patterns in the data. Which of the following tasks is NOT an example where searching for patterns is needed to produce useful information?

A high school analyzing student grades to identify the students with the top ten highest grade point averages

Which of the following statements are true about high-level programming languages? Select two answers. A. A high-level programming language often uses natural language elements. B. A high-level programming language does not ensure program reliability. C. A high-level programming language must be used to execute commands such adding and multiplying. D. a high-level program langauge allows for code re-use

A. A high-level programming language often uses natural language elements. D. A high-level program language allows for code re-use

Which of the following changes will NOT affect the results when the code segment is executed?

A. Changing line 3 to b=10

The following two algorithms are designed to find the minimum value in a list of integers. Algorithm I: Create a variable min, and set this to the first value in the list. Compare each subsequent value in the list against the value of min, and if it is smaller than or equal to the current value, set min to this value. When the end of the list is reached, display the value of min. Algorithm II: Create a variable min, and set this to 0. Compare each value in the list against the value of min, and if it is smaller than the current value, set min to this value. When the end of the list is reached, display the value of min. Which of the following statements correctly demonstrates that the two algorithms are NOT equivalent?

Algorithm I will correctly display the minimum value of the list [4, 10, 6, 1], but Algorithm II will not

Many tasks, large and small, can be solved by performing a specific set of actions and making a particular set of decisions in very precise ways. These sets of actions and decisions are known as what?

Algorithms

Identify the two true statements about HTTP.

An HTTP request is sent from a client to request access to data stored on a server. Displaying a web page will often require multiple HTTP requests in order to acquire all the necessary data.

Which of the following best describes a Distributed Denial of Service (DDoS) attack?

An attempt to deny users access to a Web site's resources by flooding the Web site with requests from multiple systems. (correct answer)

2 times as many items can be uniquely identified

An online store uses 6- bit binary sequences to identify each unique item for sale. The store plans to increase the number of items it sells and is considering using 7- bit binary sequences. Which of the following best describes the result of using 7- bit sequences instead of 6- bit sequences?

The best way to compare a binary number to a hexadecimal number is to convert: A. the binary number to a decimal number and then compare that to the hexadecimal number. B. the binary number to a hexadecimal number and compare that to the hexadecimal number. C. the hexadecimal number to a binary number and then to a decimal value to compare. D. the hexadecimal number to a decimal number and compare that to the binary number.

B

True or False: You can drag and drop the ImageSprite Component from Animation tab directly onto the screen? A. True B. False

B

True or False? An algorithm is a precise sequence of statements that must be expressed in a computer language. A. True B. False

B

What is an advantage of using modularization in computer programming? A. Anyone who codes can work on the solution. B. Each sub-problem can be solved in a few steps. C. More programmers are required to solve the problem. D. More time can be spent programming the solution.

B

Which design approach should be considered when several programs all require similar functionality? A. Menu B. Object-oriented C. Procedural D. Subclass

B

Consider the following numbers given in Binary (BIN), Decimal (DEC), and Hexadecimal (HEX) representations: BIN: 1110 DEC: 13 HEX: F Which of the following lists the numbers in order from least to greatest? A. BIN: 1110, DEC: 13, HEX: F B. DEC: 13, BIN: 1110, HEX: F C. DEC: 13, HEX: F, BIN: 1110 D. HEX: F DEC: 13, BIN: 1110

B. DEC: 13, BIN: 1110, HEX: F

The Chart below from Google Trends shows the prevelance of some search terms in the United States between 2004 and the present. Which of the following is the most accurate statement of what this chart is showing. A. Since sometime around 2009, red has become the favorite color of more people B. Generally speaking, since 2009 more people use "red" in their search terms more than they use "blue", "yellow", "green", or "purple" C. The general decline in the search term "yellow" might be due to the decline of searches for yellow taxis, as car sharing services have become more popular D. Generally speaking, the volume of internet searches is increasing over time because the number of people using the internet is also increasing.

B. Generally speaking, since 2009 more people use "red" in their search terms more than they use "blue", "yellow", "green", or "purple"

Which of the following best describes an undecidable problem? A. Heuristic methods are used to find a reasonable, but not the best, solution. B. No algorithm can be constructed that always leads to a correct yes-or-no answer. C. A binary sequence may or may not be applied correctly, given the particular data set. D. Some data sets are so large that it is impossible for computing tools to facilitate the discovery of connections in information.

B. No algorithm can be constructed that always leads to a correct yes-or-no answer.

A bakery collects data on sales. Each sales record includes the date of the sale and some metadata about the items that were part of the sale. The data includes: the names of the items sold, the types of items sold, the number of each item sold, and the price of each item sold. Which of the following CANNOT be determined from the bakery's data set? A. The total income from sales the bakery received in the past month. B. Which customer most frequently purchases bread. C. The item bought in the highest quantity in the past week. D. Days when certain items sell the most.

B. Which customer most frequently purchases bread.

How is the bandwidth of a network measured?

Bitrate. Higher bitrate means higher bandwidth.

Which of the following describes how a distributed denial-of-service (DDoS) attack is most likely to compromise an online store's Web site?

By preventing customers from placing orders

How does Visual Basic differ from Basic? A. Basic is a high level language and Visual Basic is low level. B. Basic is a newer language than Visual Basic. C. Visual Basic is an object-oriented language and Basic is not. D. Visual Basic is easy to learn and Basic is not.

C

What event causes the Mole to move to a new random location? A. When the score changes. B. When the user tilts the phone. C. When the Clock Timer ticks. D. When the Reset button is pressed.

C

Which act gives individuals the right to see information maintained about them? A. Electronic Communications Privacy Act of 1986 B. Federal Information Security Management Act of 2002 C. Consumer Credit Reporting Reform Act of 1996 D. Privacy Act of 1974

C

Consider the following code segment, which uses the variables r, s, and t. r=1 s=2 t=3 r=s s=t Display (r) Display (s) What is displayed as a result of running the code segment? What is displayed as a result of running the code segment? (A) 1 1 (B) 1 2 (C) 2 3 (D) 3 2

C) 2 3

Computers are often used to search through large sets of data to find useful patterns in the data. Which of the following tasks is NOT an example where searching for patterns is needed to produce useful information? (2) (A) A credit card company analyzing credit card purchases to identify potential fraudulent charges (B) A grocery store analyzing customers' past purchases to suggest new products the customer may be interested in (C) A high school analyzing student grades to identify the students with the top ten highest grade point averages (D) An online retailer analyzing customers' viewing habits to suggest other products based on the purchasing history of other customers

C) A high school analyzing student grades to identify the students with the top ten highest grade point averages

In researching a local deer population, a scientist has gathered much information about the deer and is going to write a program to model population growth over time. She wants to analyze how illness and population size are related to available food sources. Which of the following factors most likely does not need to be included in her program: A. Population size. B. Food supply. C. Antler size. D. Prevalence of illness in herd.

C. Antler size

Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals. The time The date The location of the animal Which of the following questions about a particular animal could NOT be answered using only the data collected from the tracking collars? A. Approximately how many miles did the animal travel in one week? B. Does the animal travel in groups with other tracked animals? C. Do the movement patterns of the animal vary according to the weather? D. In what geographic locations does the animal typically travel?

C. Do the movement patterns of the animal vary according to the weather?

Which of the following activities poses the greatest personal cybersecurity risk?

C. Reserving a hotel room by e-mailing a credit card number to a hotel (email is most unsecure)

An algorithm has been developed to compute the sum of all the elements in a list of integers. Which of the following programming structures must be added to the existing algorithm so that the new algorithm computes the sum of only the even integers in the list? (2) (A) Iteration (B) Searching (C) Selection (D) Sequencing

C. Selection

A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following meta data. The time the message was posted The name of the user who posted the message The names of any users who comment on the message and the times the comments were made For which of the following goals would it be more useful to analyze the data instead of the metadata? A. To determine the users who post messages most frequently B. To determine the time of day that the site is most active C. To determine the topics that many users are posting about D. To determine which posts from a particular user have received the greatest number of comments Answer

C. To determine the topics that many users are posting about

A search engine has a trend-tracking feature that provides information on how popular a search term is. Which of the following questions is LEAST likely to be answerable using the trends feature?

C. What is the cost of a certain electronics product?

A team of students is programming a robot to find its way out of a maze(exact layout unknown) for a national competition. The robot will be timed, and teams with the best times will move on to the next level of the competition. What strategy should the team take? A. Have the robot create a virtual map of the maze, return to the starting position, calculate the quickest route, and take it. B. Program the robot to move at maximum speed, turning left or right at random until it finds the end. C. Use a language most appropriate to the problem at hand, and us built-in functions, such as rotate(RIGHT) and move(), to have the robot complete the task. D. Create an algorithm which, although not finding the ideal solution, finds a reasonable solution quickly.

D. Create an algorithm which, although not finding the ideal solution, finds a reasonable solution quickly.

Two computers are built by different manufacturers. One is running a Web server and the other is running a Web browser. Which of the following best describes the ability of the two computers to communicate with each other across the Internet?

D. The computers can communicate directly because Internet communication uses standard protocols.

A programmer is writing a system that is intended to be able to store large amounts of personal data. As the programmer develops the data system, which of the following is LEAST likely to impact the programmer's choices in designing the structure of the system? A. Maintaining privacy of the information stored in the data set. B. Scalability of the system. C. Structuring the metadata of the information for analysis. D. The frequency of a particular item occurring in a data set.

D. The frequency of a particular item occurring in a data set.

When choosing a programming language, which of the following will not be determined by the choice of language? A. The clarity and readability of the code. B. The data structures available. C. The syntax highlighting options available. D. Whether or not a solution exists.

D. Whether or not a solution exists.

Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals

Do the movement patterns of the animal vary according to the weather? (correct answer)

Which of the following statements about the Domain Name System (DNS) are true?

I - The Domain Name System is hierarchical

Which of the following are true statements about digital certificates in Web browsers? I. Digital certificates are used to verify the ownership of encrypted keys used in secured communication. II. Digital certificates are used to verify that the connection to a Web site is fault tolerant.

I only

An IOException is a compile-time (syntax) error

False

The body of a while-loop will always execute at least once time

False

True or False: The Internet is non-existent in the developing world.

False

x-- is functionally equivalent to x = x-x

False

A programmer completes the user manual for a video game she has developed and realizes she has reversed the roles of goats and sheep throughout the text. Consider the programmer's goal of changing all occurrences of "goats" to "sheep" and all occurrences of "sheep" to "goats." The programmer will use the fact that the word "foxes" does not appear anywhere in the original text. Which of the following algorithms can be used to accomplish the programmer's goal?

First, change all occurrences of "goats" to "foxes." Then, change all occurrences of "sheep" to "goats." Last, change all occurrences of "foxes" to "sheep."

What feature of DNS and IP allow the internet to scale?

Hierarchy

Which of the following statements are true about the Internet? I - The Internet connects devices and networks all over the world II - The Internet helps people collaborate to solve problems III - The Internet helps people communicate IV - There are no negative consequences of the Internet, it is purely positive

I, II, and III

Which of the following statements are true about using a high-level programming language instead of a lower-level language? I. Programs written in a high-level language are generally easier for people to read than programs written in a low-level language. II. A high-level language provides programmers with more abstractions than a low-level language. III. Programs written in a high-level language are generally easier to debug than programs written in a low-level language.

I, II, and III

Which of the following statements are true about Internet routing?

II - Routing on the Internet is fault tolerant and redundant

How does a computer resolve a domain name into an IP address?

It asks a DNS server for the corresponding IP address

What is the name of the computer language that uses a turtle to implement drawing algorithms? Type your answer into the textbox (spelling counts).

Logo

In the program below, the initial value of x is 5 and the initial value of y is 10. IF (x < 0) { DISPLAY ("Foxtrot") } ELSE { IF (x > y) { DISPLAY ("Hotel") } ELSE { IF (y > 0) { DISPLAY ("November") } ELSE { DISPLAY ("Yankee") { } } What is displayed as a result of running the program?

November

The code segment below uses the procedure IsFound (list, item), which returns true if item appears in list and returns false otherwise. The list resultList is initially empty. Which of the following best describes the contents of resultList after the code segment is executed?

Only elements that appear in both inputList1 and inputList2 (because the code is going to put items into both lists since it is saying inputList 1 and 2)

Which of the following explains a benefit of using open standards and protocols for Internet communication?

Open standards and protocols allow different manufacturers and developers to build hardware and software that can communicate with hardware and software on the rest of the network.

Which of the following is an important step to take before beginning to write the code for a program?

Plan the logic and anticipated input/output of the code

Which of the following refers to a widely agreed upon set of rules that standardize communication between machines?

Protocol

When the green flag is clicked, each of the three scripts is intended to run in turn, however, due to a mistake in the code, this does not happen. Which of the following changes could Tom make to ensure that all four of the scripts run as intended?

Replace the block broadcast sound3 with the block broadcast sound 2

Which of the following makes sure that each request is forwarded to its intended recipient?

Router

As part of the lifecycle of a program, after a computer programmer writes the code, it is then compiled and usually used to create an executable file to be run on the CPU. The code that is run through the compiler is known as what?

Source Code

Which of the following is a characteristic of the hierarchical nature of IP addresses?

The ability to quickly locate an IP address within a large network

Which of the following is NOT a characteristic of the redundant nature of routing on the Internet?

The ability to use a hierarchical naming system to avoid naming conflicts

A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled player has a turn, the game runs slowly because the computer evaluates all potential moves and selects the best one. Which of the following best describes the possibility of improving the running speed of the game?

The game's running speed might be improved by using a process that finds approximate solutions every time the computer-controlled player has a turn.

A student is recording a song on her computer. When the recording is finished, she saves a copy on her computer. The student notices that the saved copy is of a lower sound quality than the original recording. Which of the following could be a possible explanation for the difference in sound quality?

The song was saved using fewer bits per second than the original song.

Which of the following could be considered part of the beginning "state" of a Scratch program?

The value of a variable The background image Visibility of sprites

A certain social media Web site allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following metadata: 1. The time the message was posted 2. The name of the user who posted the message 3. The names of any users who comment on the message and the times the comments were made For which of the following goals would it be more useful to analyze the data instead of the metadata?

To determine the topics that many users are posting about

Which of the following best describes the purpose of the domain name system (DNS)?

Translating domain names to IP addresses

The braces that indicate the body of a loop can be ommitted if the loop contains only 1 statement

True

The second statement in the header of a for-loop is the loop's condition

True

True or False: The Internet is a network connecting individual networks.

True

ASCII character J; decimal 74

What ASCII character is represented by the binary (base 2) number 1001010?

An internet protocol (IP) address is assigned to the device

Which of the following best explain what happens when a new device is connected to the internet?

Which of the following procedure calls can be used to demonstrate that the procedure does NOT Work as intended?

c. FindName (["Andrea", "Ben", "Chris"], "Ben")

Decimal 11, Binary 1100, Hexadecimal D

list of numbers in order from least to greatest

Central High School keeps a database of information about each student, including the numeric variables numberOfAbsences and gradePointAverage. The expression below is used to determine whether a student is eligible to receive an academic award. (numberOfAbcenses ≤ 5) AND (gradePointAverage > 3.5) Which of the following pairs of values indicates that a student is eligible to receive an academic award?

numberOfAbsences = 5, gradePointAverage = 3.8

An office building has two floors. A computer program is used to control an elevator that travels between the two floors. Physical sensors are used to set the following Boolean variables. [See image]. The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on. Which of the following Boolean expressions can be used in a selection state to cause the elevator to move?

onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

The table below shows the time a computer system takes to complete a specified task on the customer data of different-sized companies. Based on the information in the table, which of the following tasks is likely to take the longest amount of time when scaled up for a very large company of approximately 100,000 customers?

sorting data

ASCII is a character-encoding scheme that uses a numeric value to represent each character. For example, the uppercase letter "G" is represented by the decimal (base 10) value 71. A partial list of characters and their corresponding ASCII values are shown in the table below https://media.quizizz.com/resource/gs/quizizz-media/questions/L2FwcGhvc3RpbmdfcHJvZC9ibG9icy9BRW5CMlVwOXVKSWdjM0VpNVptZnBJaHk4WjF2WmtuR210NS1MZTlBWWY2OGhlcUpjakNUdEtoVW9JR1N1UU1FN3NaWTBudzI1U1M2YTEzOGcwYmFnNGw5SDFmOWVlTVVIQS5WY3l5cUtXdFNyYWYtVFR4?w=200&h=160

v

not (num<15) and (num>15) or (num=15)

which of the following Boolean expressions are equivalent to the expression num _> 15

the remainder of when dividing a whole number by 2 and the value of a Boolean variable

which of the following can be represented by a single binary digit?


Related study sets

Abeka American Literature Appendix Quiz HH

View Set

Physics Practice Questions - Chapter 15

View Set

Sociology 1301 Final Chapter 14:3

View Set

Pituitary Disorders Hyperprolactinemia to End

View Set

Telephone Home Wiring Conventional

View Set

EDEC 3610-Midterm Review (Ch 1, 2, 3, 4, 5, 6, 7)

View Set

chapter 4: agnosia and perception

View Set