APCSP AP EXAM

Ace your homework & exams now with Quizwiz!

The figure below represents a network of physically linked computers labeled A through F. A line between two computers indicates that the computers can communicate directly with each other. Any information sent between two computers that are not directly connected must go through at least one other computer. For example, information can be sent directly between computers A and B, but information sent between computers A and C must go through other computers. What is the minimum number of connections that must be broken or removed in the network before computer E can no longer communicate with computer F? 1 2 3 4

2

What is the minimum number of bits you would need to represent a number on a 0 to 10 scale? 1 2 4 10

4

You are writing a program to simulate a coin toss. What line of code could be used to replace <MISSING CONDITION> so that there is a 50-50 chances of your program printing heads or tails? IF(<MISSING CONDITION>) { DISPLAY("Heads") } ELSE { DISPLAY("Tails") } RANDOM(1, 2) > 2 RANDOM(1, 2) < 1 RANDOM(1, 2) = 1 RANDOM(1, 2) = 0

RANDOM(1, 2) = 1

Consider the code segment below. PROCEDURE Mystery (x) { result ← 0 REPEAT 2 TIMES { REPEAT 3 TIMES { result ← x + result } } RETURN result } Which of the following expressions is equivalent to the value returned from Mystery(x)? 2 + 3 + x 2 + (3 * x) 2 * 3 * x 3 + (2 * x)

2 * 3 * x

Consider the code segment below. PROCEDURE Mystery (word, list) { FOR EACH item IN list { IF (item = word) { RETURN (true) } } RETURN (false) } Which of the following best describes the behavior of the Mystery PROCEDURE? Return whether or not word is in list Return the index of word in list Display true for each occurrence of word in list Display the index of word in list

Return whether or not word is in list

Consider the code segment below. PROCEDURE Mystery (number) { RETURN ((number MOD 2) = 0) } Which of the following best describes the behavior of the Mystery PROCEDURE? Returns the remainder of number divided by 2 Returns whether or not number is even Returns number divided by 2 Returns whether or not number is equal to 0

Returns whether or not number is even

Which of the following activities has the greatest potential for compromising your personal privacy? Sharing your device's IP address Switching a device from IPv4 to IPv6 Sharing your email address Sharing the cookies stored in your Web browser

Sharing the cookies stored in your Web browser

Which of the following activities poses the LEAST potential cybersecurity risk? Clicking on a link in an email from an unknown sender Sharing your device's private key used for encryption Sharing your device's public key used for encryption Using a credit card to make an online purchase on a website that does not use encryption

Sharing your device's public key used for encryption

Which of the following describes a limitation of cloud computing? Cloud computing is useful for individuals but not useful for businesses or governments Cloud computing has a negative effect on the scalability of systems Cloud computing has a negative effect on communication and collaboration among teams of people Storing data using cloud computing rather than storing on a personal computer may weaken the security of data.

Storing data using cloud computing rather than storing on a personal computer may weaken the security of data

Which of the following is a characteristic of the hierarchical nature of the domain name system (DNS)? The ability to provide data transmission even when some connections have failed The ability to resend packets when they are unable to make it to their final destination The ability to easily scale the system to allow for a large number of domain names The ability to defend against DNS spoofing

The ability to easily scale the system to allow for a large number of domain names

Which of the following is NOT a characteristic of the redundant nature of routing on the Internet? The existence of multiple paths between two addresses The ability to transmit data between two devices even when some connections in the network are broken The ability to reroute data when one connection is overloaded The ability to use a hierarchical naming system to avoid naming conflicts

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

An IPv4 address has 32 bits. In anticipation of having more devices on the Internet than there are IPv4 addresses, we are currently in the process of switching to IPv6, which uses 128 bits to represent a single address. Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses? 96 times as many addresses can be represented 296 times as many addresses can be represented 962 times as many addresses can be represented 2 times as many addresses can be represented

2^96 times as many addresses can be represented

Which of the following statements describes a limitation of using a heuristic approach to solve a problem? A heuristic approach can only provide an approximate solution, rather than an exact solution Heuristic approaches cannot be run in a reasonable amount of time Heuristic approaches only run on very powerful computers that are not available to the general public Using heuristics generally increases the time it takes for an algorithm to run

A heuristic approach can only provide an approximate solution, rather than an exact solution

Which of the following programs is most likely to benefit from the use of a heuristic? A program that determines whether or not a given number exists in a list A program that sorts a list of numbers from least to greatest A program that counts the number of characters in an essay A program that computes the best move to play in a board game

A program that computes the best move to play in a board game

A researcher is emailing images of soil samples back to her lab so her team can analyze them. She notices that the images sent in her email are of lower quality than the images on her camera. Which of the following could be a possible explanation for the difference in image quality? Before being sent, the image was compressed using a lossless compression technique Before being sent, the image was compressed using a lossy compression technique Some information was lost due to network packets not reaching their final destination Before being sent, the image was encrypted using asymmetric encryption

Before being sent, the image was compressed using a lossy compression technique

In the program below, the initial value of a is 0 and the initial value of b is 1. IF (b = 0) { IF (b = 1) { DISPLAY ("Karel") } } ELSE { IF (a = 1) { DISPLAY ("Tracy") } ELSE { DISPLAY ("Dog") } DISPLAY ("Turtle") } What is displayed as a result of running this program? Karel Dog Tracy Turtle Tracy Dog Dog Turtle

Dog Turtle

Which of the following activities poses the greatest personal cybersecurity risk? Entering your password to login to a Web site encrypted over HTTPS Emailing your bank account number to an online vendor to purchase a product from them Providing your email address when taking an online survey Downloading a free text editor program on the Internet

Emailing your bank account number to an online vendor to purchase a product from them

Given the following algorithms, which one uses selection? Given a list of integers, display the length of the list. Given two numbers display the larger of the two. Given two numbers display the average of the two. Given a list of integers return the list in reverse order.

Given two numbers display the larger of the two.

Which of the following statements are true about using a high-level programming language instead of a lower-level language? I - Some algorithms can only be expressed in low-level languages, and cannot be expressed in any high-level languages II - Code in a high-level language is often translated into code in a lower-level language to be executed on a computer I only II only I and II Neither I nor II

II only

Which of the following statements describes an advantage of using a computer simulation to model a real-world object or system? Computer simulations model real-world objects and systems perfectly, without making any simplifying assumptions. Simulations allow us to test real-world events without the cost or danger of building and testing the phenomena in the real world. Computer simulations run very quickly, regardless of the level of detail of the model. Computer simulations are easy to debug.

Simulations allow us to test real-world events without the cost or danger of building and testing the phenomena in the real world.

Which of the following is true about why it is important to write clear function names? The name changes how the program functions. The name makes it clear what the purpose of the function is. The name allows you to translate the program into other languages. The name of a function is only used by the computer.

The name makes it clear what the purpose of the function is.

A program is expressed in a programming language. Which of the following is true of the program? The program can also be expressed as binary code, but this increases the likelihood of errors The program can also be expressed as binary code, which is what the program will be translated to in order to execute on the computer The program cannot be expressed as binary code Some parts of the program can be expressed as binary code, but most features of programming languages cannot be translated to binary code.

The program can also be expressed as binary code, which is what the program will be translated to in order to execute on the computer

Given the following Mystery procedure, how can you best describe the result it returns? PROCEDURE Mystery (list, target) { length ← LENGTH (list) i ← 1 REPEAT length TIMES { if (list[i] = target) { REMOVE(list, i) } ELSE { i ← i + 1 } } RETURN (list) } This procedure returns the list without the first instance of the given target This procedure returns the list without any instance of the given target This procedure returns the list where each instance of the given target is replaced by the index. This procedure returns the number of times the target appears in the list

This procedure returns the list without any instance of the given target

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 search term. Which of the following questions is LEAST likely to be answerable using the trends feature? In what month does "swimming pool" receive the most searches? What region of the country has the greatest number of people searching for a certain musical artist? What region of the country has the highest population of a particular animal? When are flights to Hawaii likely to be the cheapest?

What region of the country has the highest population of a particular animal?

According to the domain name system (DNS), which of the following is a subdomain of the domain test.com? test.gov test.co.edu test.com.biz info.test.com

info.test.com

Consider the code segment below. You can assume that Mystery returns either true or false, and Input_List_From_User asks the user for several values and returns them as a list. inputList ← Input_List_From_User () resultList ← [] FOR EACH item in inputList { IF (Mystery (item)) { APPEND (resultList, item) } } Based on the code segment, how would you best describe the value of resultList? resultList contains all items from inputList that did not meet the Mystery condition resultList is always an empty list resultList contains all items from inputList that met the Mystery condition resultList always contains all items from inputList

resultList contains all items from inputList that met the Mystery condition

A byte is made up of 8 bits (binary digits). You have a programming language that uses one byte to represent characters and are now modifying your language to use two bytes to represent characters. How many more characters can you represent in your new programming language? 8 times as many characters 28 times as many characters 82 times as many characters 2 times as many characters

2^8 times as many characters

Computers are often used to search through large sets of data to find useful patterns in the data. Which of the following tasks is an example where searching for patterns is needed to produce useful information? A high school searching over student GPAs to identify the student with the highest GPA A grocery store searching over its inventory to determine which items are running low A music application searching over a user's library to determine if a particular song exists An online retail store analyzing customers' viewing habits to suggest other products based on the purchasing history of other customers

An online retail store analyzing customers' viewing habits to suggest other products based on the purchasing history of other customers

Assume we have an algorithm used to simulate the results of flipping a coin n times. Two variables used for the algorithm are heads_counter, storing the number of heads we've had, and flip_counter, storing the number of flips we've made. We want to add on to the algorithm so that at the end we display whether there were an odd or even number of tails. Here are two algorithms that display whether we have an even or odd number of tails: Algorithm A: Set the value of num_tails to (flip_counter - heads_counter). If the value of num_tails MOD 2 is equal to 0, DISPLAY ("Even"), otherwise DISPLAY ("ODD"). Algorithm B: Set the value of even_flips to (n MOD 2) = 0 and set the value of even_heads to (heads_counter MOD 2) = 0. If even_flips is equal to even_heads then DISPLAY ("EVEN"), otherwise DISPLAY ("ODD"). Algorithm A always calculates the correct answer, but Algorithm B does not. Algorithm B always calculates the correct answer, but Algorithm A does not. Both Algorithm A and Algorithm B always calculate the correct answer. Neither Algorithm A nor Algorithm B calculates the correct answer.

Both Algorithm A and Algorithm B always calculate the correct answer.

A programmer wrote the following program intending to print the maximum value in list. You can assume list has at least one element in it. Line 1: max ← 0 Line 2: FOR EACH num IN list Line 3: { Line 4: IF (num > max) Line 5: { Line 6: max ← num Line 7: } Line 8: } Line 9: DISPLAY (max) What change do you need to make to be able to display the correct maximum value for any list of integers? No change. This code works Change line 6 to num ← max Change line 1 to max ← list[1] Change line 4 to IF (num ≥ max)

Change line 1 to max ← list[1]

Consider the code segment below Line 1: IF (x = 0) Line 2: { Line 3: x ← -1 * x + y Line 4: } Line 5: ELSE Line 6: { Line 7: x ← x + y Line 8: } Which of the following will NOT affect the results when the code segment is executed? Switching line 3 and line 7 Change line 3 to x ← y Remove the else statement and run line 7 no matter what Change line 3 to x ← -1 * y + x

Change line 3 to x ← y

Why is it important to focus on programming style in addition to programming functionality? I) Program style helps others understand your program and maintain it II) Programming style only applies to certain programming languages III) Programming style increases the reusability of your code Only I I and II I and III II and III

I and III

Which of the following statements are true: I - Every problem can be solved with an algorithm for all inputs, but some of these algorithms have not yet been discovered II - Every problem can be solved with an algorithm for all inputs, but some problems cannot be solved in a reasonable amount of time III - There exist problems that cannot be solved by any algorithm for all inputs I only II only III only I and II

III only

Procedures A and B are meant to get the minimum value of a list of one or more integers. We have the two procedures below Procedure A PROCEDURE getMin(list) { min ← list[1] FOR EACH item IN list { IF (item < min) { min ← item } } RETURN min } Procedure B PROCEDURE getMin(list) { min ← list[1] counter ← 1 REPEAT LENGTH (list) TIMES: { counter ← counter + 1 item ← list[counter] IF (item < min) { min ← item } } RETURN min } Procedure A returns the correct minimum value, but Procedure B does not. Procedure B returns the correct minimum value, but Procedure A does not. Both Procedure A and Procedure B display the correct minimum value. Neither Procedure A nor Procedure B returns the correct minimum value.

Procedure A returns the correct minimum value, but Procedure B does not.

Consider the following code segment: i ← 1 counter ← 1 repeat until <MISSING CONDITION> { DISPLAY (i) i ← i * 2 counter ← counter + 1 } Which of the following replacements for <MISSING CONDITION> will display the first 10 powers of 2? i ≥ 100 counter > 10 counter ≥ 10 counter = i * 2

counter > 10

Consider the following code segment: i ← 100 repeat until i = 0 { <MISSING CODE> } Which of the following replacements for <MISSING CODE> will cause an infinite loop? i ← i MOD 2 i ← i MOD 3 i ← i MOD 4 i ← i MOD 5

i ← i MOD 3

Consider the code segment below. You can assume that Input_List_From_User asks the user for several values and returns them as a list. inputList ← Input_List_From_User () resultList ← [] FOR EACH item in inputList { APPEND (resultList, Mystery (item)) } Based on the code segment, how would you best describe the value of resultList? resultList is always an empty list resultList always contains all items from inputList resultList contains all items from inputList that met the Mystery condition resultList contains the result of calling the Mystery procedure on every item in inputList

resultList contains the result of calling the Mystery procedure on every item in inputList

We want to create an algorithm called swapValues. Given two variables x and y the result should have the values of x and y swapped. Which of the following algorithms correctly swaps the values of x and y? y ← x temp ← x x ← y x ← y y ← x temp ← x x ← y y ← temp temp ← x y ← temp y ← x

temp ← x x ← y y ← temp

Consider the code segment below. PROCEDURE Mystery (x) { result ← 0 REPEAT 5 TIMES { result ← x + result } RETURN result } Which of the following expressions is equivalent to the value returned from Mystery(x)? x + 5 x / 5 x - 5 x * 5

x * 5

Consider the code segment below. PROCEDURE Mystery (x, y) { result ← 0 REPEAT y TIMES { REPEAT x TIMES { result ← result + 1 } } RETURN result } Which of the following expressions is equivalent to the value returned from Mystery(x, y)? y * x y + x y / x y - x

y*x

PROCEDURE Mystery (word, list) { x ← 0 y ← 0 FOR EACH item IN list { IF (item = word) { x ← x + 1 } ELSE { x ← 0 } IF (x > y) { y ← x } } RETURN (y) } What is the value of Mystery("karel", ["karel", "karel", "tracy", "karel", "karel", "karel", "tracy"]) 2 3 4 5

3

Which of the following Boolean expressions is not equivalent to the expression num * -1 ≥ 10 (num < 0) AND (num * -1 = 10) (num < -10) OR (num = -10) (num * -1 > 10) OR (num = -10) NOT num * -1 < 10

(num < 0) AND (num * -1 = 10)

A video viewing Website previously used 32-bit integers to store the number of views for each video, but a video that had been watched billions of times hit the maximum value. What is it called when this maximum is exceeded? An overflow error A maximum error A kilobyte error A viewing error

An overflow error

Question: 35 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 lossy transformation of the digital image (a transformation in which information is lost and cannot be restored)? Creating the negative of an image by creating a new RGB 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. Swapping the Red and Green values of each pixel so that areas that were red now appear green and vice versa. Creating a mirrored image by swapping the RGB values from pixels on the left side of an image with RGB values from pixels on the right side of an image. Creating the gray scale of an image by averaging the amounts of red, green, and blue in each pixel and assigning this new value to the corresponding pixel in the new image. The new value of each pixel represents a shade of gray, ranging from white to black.

Creating the gray scale of an image by averaging the amounts of red, green, and blue in each pixel and assigning this new value to the corresponding pixel in the new image. The new value of each pixel represents a shade of gray, ranging from white to black.

Consider the following numbers Binary 1001001 Decimal 70 Hexadecimal 4E Which of the following lists the numbers in order from least to greatest? Binary 1001001, Decimal 70, Hexadecimal 4E Decimal 70, Binary 1001001, Hexadecimal 4E Binary 1001001, Hexadecimal 4E, Decimal 70 Decimal 70, Hexadecimal 4E, Binary 1001001

Decimal 70, Binary 1001001, Hexadecimal 4E

Consider the following search algorithms: Algorithm 1: Given a list songList, and a target value songToFind: Step 1: A variable position is assigned a random index within songList Step 2: A variable song is assigned the value at songList[position] Step 3: IF song = songToFind, return position. ELSE, go back to step 1 Algorithm 2: Given a list songList, and a target value songToFind: Step 1: Repeat Steps 2 and 3 for every index i in songList: Step 2: A variable song is assigned the value at songList[i] Step 3: IF song = songToFind, return i Step 4: Return -1 Which of the following is a true statement about these algorithms? Generally, as the size of songList becomes larger, Algorithm 1 will be more efficient than Algorithm 2 Generally, as the size of songList becomes larger, Algorithm 2 will be more efficient than Algorithm 1 In all cases, Algorithm 2 will always take less steps to find the target value than Algorithm 1 In all cases, Algorithm 1 will always return the correct position

Generally, as the size of songList becomes larger, Algorithm 2 will be more efficient than Algorithm 1

A large data set contains information about all students in colleges across the United States. The data set contains the following information about each student. The student's gender The state in which the student attends college The student's grade point average on a 4.0 scale The student's major Which of the following questions could be answered by analyzing only information in the data set? Which college has the highest number of female computer science majors? How many states have computer science as the most common major for female students? Do students attending college in the United States tend to have higher grade point averages than students in other countries? Which state has the highest graduation rate for computer science majors?

How many states have computer science as the most common major for female students?

A user enters a Web address in a browser, and a request for a file is sent to a Web server. Which of the following statements are true about how the file is sent to the user? I - The file is broken down into several packets for transmission. II - The packets must be reassembled by the user's device upon receipt. III - The user's browser must request each individual packet, in order, until all packets are received I only I and II I and III I, II, and II

I and II

The figure below represents a network of physically linked computers labeled A through F. A line between two computers indicates that the computers can communicate directly with each other. Any information sent between two computers that are not directly connected must go through at least one other computer. For example, information can be sent directly between computers A and B, but information sent between computers A and C must go through other computers. Which of the following statements are true about this network: I - The network is fault tolerant. If a single connection fails, any two devices can still communicate. II - Computers B and F need to first communicate with at least one other device in order to communicate with each other. I only II only I and II Neither I nor II

I and II

Which of the following are true statements about Distributed Denial of Service (DDoS) attacks? I - DDoS attacks compromise a target website by flooding it with requests from multiple systems II - DDoS attacks are carried out using a large group of computers III - DDoS attacks can be prevented using encryption I only III only I and II only I, II, and III

I and II only

When a cellular telephone sends a text message, the cell carrier encodes the text message and transmits the message to the receiving cellular telephone. The encoded text message is the data of the transmission. In addition to transmitting the data, the cell carrier company also stores metadata. The metadata of the text message includes the time the message was sent, the phone number of the sender, and the phone number of the receiver. For which of the following goals would it be more useful to computationally analyze the metadata instead of the data? I. Estimate the number of texts that will be sent next month II. Determine the most frequently used emoji in text messages III. Determine if two phones have been in contact in the last week I only II only I and III I, II, and III

I and III

Which of the following are true statements about phishing attacks? I - Phishing attacks are characterized by communication from one person trying to trick another person into divulging personal information II - Phishing attacks can be defended against using the DNS system I only II only Both I and II Neither I nor II

I only

The computer science department at a university is using the following program to determine the average GPA of the department on a 4 point scale. Unfortunately, some of the data was entered incorrectly and values greater than 4 exist in the system. The department determines that if a student's GPA is greater than 4 it should be excluded from the average. The students' GPAs are stored in the list studentGPAs, which is indexed from 1 to n. gradePointAverageSum ← 0 numGPAs ← LENGTH (studentGPAs) i ← 1 REPEAT n TIMES { <MISSING CODE> } DISPLAY (gradePointAverageSum / numGPAs) Which of the following code segments can replace <MISSING CODE> so that the program works as intended? IF (studentGPAs[i] ≥ 4) { gradePointAverageSum ← gradePointAverageSum + studentGPAs[i] } ELSE { numGPAs ← numGPAs - 1 } i ← i + 1 IF (studentGPAs[i] ≤ 4) { gradePointAverageSum ← gradePointAverageSum + studentGPAs[i] } ELSE { numGPAs ← numGPAs - 1 } i ← i + 1 IF (studentGPAs[i] ≤ 4) { gradePointAverageSum ← gradePointAverageSum + studentGPAs[i] i ← i + 1 } ELSE { numGPAs ← numGPAs - 1 } IF (studentGPAs[i] > 4) { gradePointAverageSum ← gradePointAverageSum + studentGPAs[i] numGPAs ← numGPAs - 1 } i ← i + 1

IF (studentGPAs[i] ≤ 4) { gradePointAverageSum ← gradePointAverageSum + studentGPAs[i] } ELSE { numGPAs ← numGPAs - 1 } i ← i + 1

A blogging Website 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. 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 Which of the following questions could NOT be answered using only the data and metadata collected? Which users post messages most frequently? What time of day is the site most active? Which posts from a particular user have received the greatest number of comments? In what country is the site most active?

In what country is the site most active?

A bank uses a computer program during the night to tell if the alarm should be rung. Sensors in the bank set the following Boolean variables: vaultClosed: set to true if the bank vault is closed; otherwise false heardNoise: set to true if a microphone heard noise; otherwise false sawMovement: set to true if a camera saw movement in the bank; otherwise false The automatic alarm should notify the police if there is noise and movement in the bank, or if the bank vault is open. Which of the following boolean expressions can be used in a selection statement to ring the alarm? NOT vaultClosed OR (heardNoise AND sawMovement) heardNoise AND vaultClosed NOT vaultClosed AND sawMovement heardNoise AND sawMovement

NOT vaultClosed OR (heardNoise AND sawMovement)

Program 1 and 2 below are intended to calculate the average of the integers in a list, number_list. Program 1 sum ← 0 FOR EACH number in number_list { sum ← sum + number } DISPLAY (sum / LENGTH (number_list)) Program 2 counter ← 1 sum ← 0 FOR EACH number in number_list { sum ← sum + number counter ← counter + 1 } DISPLAY (sum / counter) Program 1 displays the correct average, but Program 2 does not Program 2 displays the correct average, but program 1 does not. Both program 1 and program 2 display the correct average. Neither program 1 nor program 2 displays the correct average.

Program 1 displays the correct average, but Program 2 does not

A city government is attempting to reduce the digital divide between groups with differing access to computing and the Internet. Which of the following actions is MOST likely to be effective in this purpose? Providing a way for citizens to vote online in local elections Providing free wireless Internet connections at locations in low-income neighborhoods Putting all government forms on the city Website Providing online basic computing classes for free

Providing free wireless Internet connections at locations in low-income neighborhoods

Consider the following program, which is intended to print the count of even numbers between 1 and number count ← 0 i ← 1 REPEAT number TIMES { IF (i MOD 2 = 0) { count ← count + 1 } i ← i + 1 } DISPLAY count Which of the following best describes the behavior of this program? The program correctly displays the count of even numbers between 1 and number The program does not work as intended because it displays the count of odd numbers between 1 and number The program does not work as intended because it displays count but should instead display i The program does not work as intended because the condition in the if statement needs to say (number MOD 2 = 0)

The program correctly displays the count of even numbers between 1 and number

Consider the code segment below. x = RANDOM (1, 10) y = RANDOM (10, 20) DISPLAY (x == y) Which of the following best describes the behavior of the the code? The program will always display true The program will always display false The program could display either true or false The program will error

The program could display either true or false

In the procedure Mystery written below, the parameter number is a positive integer. PROCEDURE Mystery (number) { result ← 1 REPEAT UNTIL (number = 1) { result ← result * number number ← number - 1 } RETURN (result) } Which of the following best describes the result of running the Mystery procedure? If the initial value of number is 1, the procedure never begins. The return value will always be greater than the initial value of number The return value will be a positive integer greater than or equal to the initial value of number The return value will be a prime number greater than or equal to the initial value of number

The return value will be a positive integer greater than or equal to the initial value of number

A construction company is building a tall skyscraper and is considering two different types of material to use for the beams in the building. The company decides to use a computer simulation of each option to determine which material will cause the building to be more stable. Which of the following is NOT true about the company's plan? The company may consider new alternatives based on the simulation results The company can use the simulation to investigate these two options without ever building anything physical The simulation will not produce usable results because actual data about each material is not available The company can incorporate other factors, such as number of floors in the building, in the simulation.

The simulation will not produce usable results because actual data about each material is not available

Given the following code segment, how can you best describe its behavior? result ← 0 FOR EACH n IN list { if (n MOD 2 = 0) { result ← result + n } } DISPLAY result This code displays the count of even numbers in list This code displays the sum of the even numbers in list This code displays the sum of the numbers at the even indices of list This code results in an error

This code displays the sum of the even numbers in list

What is the purpose of the Digital Millennium Copyright Act? To make all content on the Internet free for everyone to use. To allow for open source software on the Internet. To criminalize plagiarism on the Internet. To criminalize the act of circumventing, or getting around, access controls that block access to copyrighted works.

To criminalize the act of circumventing, or getting around, access controls that block access to copyrighted works.

Which of the following is a benefit that online shopping websites provide over brick and mortar stores? Users can try out an item before they buy it Users can easily pay with cash in person Users can easily see product reviews and determine if an item has been satisfactory for a large number of people There is no wait time between purchasing an item and having access to it

Users can easily see product reviews and determine if an item has been satisfactory for a large number of people

A Website is considering an update to its servers that would save the geolocations of users accessing the site. Which of the following is LEAST likely to occur as a result of this update? Privacy of users might be negatively affected. Storage requirements for the servers might increase. Users in a certain location may no longer be able to access the Website The Website may be able to provide content to its users that is relevant to their location

Users in a certain location may no longer be able to access the Website

Which of the following is considered an unethical use of computer resources? Downloading shareware onto your computer Using an image on a website without giving credit to the original creator Using and citing open source code in a personal program Searching the Internet for an online stream of a copyrighted movie

Using an image on a website without giving credit to the original creator


Related study sets

Trigonometric Identities + Unit Circle

View Set

JavaScript - Level 1 - All Operator Types

View Set

PHAR 253: Medications for Depression:

View Set