APCSP

Ace your homework & exams now with Quizwiz!

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

A. Changing line 3 to b=10

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.

Which of the following Boolean expressions are equivalent to the expression num 15?

b. (num > 15) OR (num = 15) c. NOT (num < 15)

What is the value of result after running the program?

b. 3y

Which of the following lists the numbers in order from least to greatest?

b. Decimal 11, Binary 1100, Hexadecimal D

Some programming languages use constants, which are variables that are initialized at the beginning of a program and never changed. Which of the following are good uses for a constant?

b. I and III only

Which of the following statements about browsing sessions in an anonymous window is true?

b. Items placed in a Web store's shopping cart for future purchase during the anonymous browsing session will not be saved on the user's computer.

Which of the following best describes the contents of resultList after the code segment is executed?

b. Only elements that appear in both inputListl and inputList2

Both online newspapers and social media sites are used to distribute information on the Internet. Which of the following best describes an advantage that online newspapers have over social media sites?

b. The ability to provide credibility to the information distributed

Which of the following is a characteristic of the fault-tolerant nature of routing on the Internet?

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

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?

b. 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.

Which of the following are benefits of using well-named variables in a computer program?

b. The program will be easier for people to read. d. The program will be easier to modify in the future.

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

b. The remainder when dividing a whole number by 2 c. The value of a Boolean variable

Which of the following pairs of values indicates that a student is eligible to receive an academic award?

b. numberOfAbsences = 5, gradePointAverage = 3.8

Which of the following can be used to replace <MISSING CONDITION> so that the code fragment will work as intended?

d. (num MOD 2) = 1

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?

d. I, II, and III

Following execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails?

d. heads_counter = 2

The programmer wants to reduce the number of operations that are performed when the program is run. Which change will result in a correct program with a reduced number of operations performed?

d. interchanging line 7 and line 8

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)

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?

Which of the following is a true statement about program documentation?

d. Program documentation is useful during initial program development and also when modifications are made to existing programs.

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 statements are true about using a high-level programming language instead of a lower-level language?

d. I, II, and III

Which of the following has the greatest potential for compromising a user's personal privacy?

a. A group of cookies stored by the user's Web browser

Which of the following is LEAST likely to indicate a phishing attack?

a. An e-mail from your bank asks you to call the number on your card to verify a transaction

A computer program uses 3 bits to represent integers. When the program adds the decimal (base 10) numbers 5 and 3, the result is 0. Which of the following is the best explanation for the result?

a. An overflow error occurred.

Researchers have developed a simulation of packets traveling between server computers and client computers in a network. Of the following, which two outcomes are most likely to be results of the simulation?

a. Better understanding of the effect of temporarily unavailable network connections d. Better understanding of the impact of increased connection speeds for frequently visited servers

Which of the following indicate that a particular laptop is not currently borrowed?

a. The difference between borrows and returns is zero. d. The sum of borrows and returns is a positive even number.

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 best describes how the file is sent to the user?

a. The file is broken into packets for transmission. The packets must be reassembled upon receipt.

A program is expressed in a programming language. Which of the following is true of the program?

a. The program can also be expressed as binary code, but will be more easily understood by humans when expressed in a higher-level programming language.

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?

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

A retailer that sells footwear maintains a single database containing records with the following information about each item for sale in the retailer's store. Using only the database, which of the following can be determined?

a. Which items listed in the database are not currently in the store

Which of the following code segments will correctly create newList?

a. newList ← Combine (listl, list2) newList ← Sort (newList) newList ← RemoveDup1icates (newList)

Which of the following best explains what happens when a new device is connected to the Internet?

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

A programmer is deciding between using a linear or binary search to find a target value in a sorted list. Which of the following is true?

b. Generally, the advantage of using a binary search over a linear search increases as the size of the list increases.

Which of the following considerations is LEAST likely to affect the ability of the program to process larger data sets?

b. How many programming statements the program contains

An algorithm will be used to identify the maximum value in a list of one or more integers. Consider the two versions of the algorithm below. Which of the following statements best describes the behavior of the two algorithms?

d. Neither algorithm will correctly identify the maximum value when the input contains both positive

A large data set contains information about all students majoring in computer science in colleges across the United States. The data set contains the following information about each student. Which of the following questions could be answered by analyzing only information in the data set?

b. How many states have a higher percentage of female computer science majors than male computer science majors attending college in that state?

Consider the following code segment, which uses the variables r, s, and t. What is displayed as a result of running the code segment?

c. 2 3

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?

c. 2 times as many items can be uniquely identified.

Which of the following programs is most likely to benefit from the use of a heuristic?

c. A program that finds the shortest driving route between two locations on a map

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 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.

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")

An author is considering publishing an e-book using a Creative Commons license. In which of the following situations would it be better for the author to use a Creative Commons license instead of a traditional copyright?

c. I and III

When a cellular telephone user places a call, the carrier transmits the caller's voice as well as the voice of the person who is called. For which of the following goals would it be more useful to computationally analyze the metadata instead of the data?

c. II and III only

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

c. J

In the program below, the initial value of x is 5 and the initial value of y is 10. What is displayed as a result of running the program?

c. November

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?

c. Selection

Which of the following is a true statement about cloud computing?

c. Storing data using cloud computing can help ensure that data are not lost if a user's computer stops functioning.

Which of the following best describes how technology companies can use this observation for planning purposes?

c. Technology companies can set research and development goals based on anticipated processing speeds.

In order to test the program, the programmer initializes numList to [0 , 1 , 4 , 5]. The program displays 10, and the programmer concludes that the program works as intended. Which of the following is true?

c. The conclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct.

Which of the following best describes the result of running the procedure Mystery?

c. The procedure returns true when the initial value of number is even, and it otherwise returns false.

A new bank plans to make customer convenience a priority by minimizing the amount of time a customer waits in line. The bank is considering two options: a single line where the customer at the front waits for the next available teller, or separate lines for each teller. The bank decides to use a computer simulation of these two options to determine the average wait time for customers. Which of the following is NOT true about the bank's plan?

d. The simulation will not produce usable results because actual customer data are not available.


Related study sets

Health safety and Risk Management (Professor)

View Set

Unit 2 Shakespeare and Hamlet Test

View Set

STA2014 - Chapter 1 : Data Collection

View Set

Essentials of Psychiatric Mental Health Nursing Chapters 1-24

View Set