Apcsp

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

The following question uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the bottom left square of the grid and facing right. A 5 by 5 grid with a right-facing triangle at the bottom of the first column. Consider the following code segment, which moves the robot in the grid. The block code consists of six lines. Some of the lines of code are indented. Line one: begin block, n, left arrow, three end block. Begin block Line two: in capital letters, REPEAT 3 TIMES Begin block Begin block Line three indented one tab, reads REPEAT n TIMES. Line four, indented two tabs, reads MOVE underscore FORWARD. Line five indented one tab, reads ROTATE underscore LEFT. Line six, indented one tab, reads n left arrow n minus one. End block End block Which of the following shows the location of the robot after running the code segment? A Choice A is a five by five square grid with a triangle pointing down in one of the squares. In choice A, the triangle is in the center square in the third row and third column. B Choice B is a five by five square grid with a triangle pointing down in one of the squares. In choice B, the triangle is in the square in the second column and third row. C Choice C is a five by five square grid with a triangle pointing down in one of the squares. In choice C, the triangle is in the square in the first column and third row. D Choice D is a five by five square grid with a triangle pointing down in one of the squares. In choice D, the triangle is in the square in the first column and second row.

A Choice A is a five by five square grid with a triangle pointing down in one of the squares. In choice A, the triangle is in the center square in the third row and third column.

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

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 B The Internet Protocol (IP) address of the user's computer C The user's e-mail address D The user's public key used for encryption

Answer A This option is correct. The aggregation of information in browser cookies can be used by websites that the user visits to track the user and collect information about the user.

Many Web browsers allow users to open anonymous windows. During a browsing session in an anonymous window, the browser does not record a browsing history or a list of downloaded files. When the anonymous window is exited, cookies created during the session are deleted. Which of the following statements about browsing sessions in an anonymous window is true? A The activities of a user browsing in an anonymous window will not be visible to people who monitor the user's network, such as the system administrator. 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. C A user will not be able to log in to e-mail or social media accounts during the anonymous browsing session. D A user browsing in an anonymous window will be protected from viruses launched from any Web sites visited or files downloaded.

Answer B This option is correct. Because the cookies created during the anonymous browsing session were deleted, no information exists in the browser to inform future visits to the same website. Thus, any shopping cart items will not be available for future purchase.

A cable television company stores information about movie purchases made by subscribers. Each day, the following information is summarized and stored in a publicly available database. The day and date each movie was purchased The title of each movie purchased The cities where subscribers purchased each movie The number of times each movie was purchased by subscribers in a given city A sample portion of the database is shown below. The database is sorted by date and movie title. Which of the following CANNOT be determined using only the information in the database? A The date when a certain movie was purchased the greatest number of times B The number of movies purchased by an individual subscriber for a particular month C The total number of cities in which a certain movie was purchased D The total number of movies purchased in a certain city during a particular month

Answer B This option is correct. It is not possible to determine the number of movies purchased by an individual subscriber for a particular month. In this database, information about individual subscribers, such as their ID number, is not stored.

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. The student's gender The state in which the student attends college The student's grade point average on a 4.0 scale Which of the following questions could be answered by analyzing only information in the data set? A Do students majoring in computer science tend to have higher grade point averages than students majoring in other subjects? B How many states have a higher percentage of female computer science majors than male computer science majors attending college in that state? C What percent of students attending college in a certain state are majoring in computer science? D Which college has the highest number of students majoring in computer science?

Answer B This option is correct. The data set stores information about an individual student's gender and state. This information can be aggregated to extract information about the percentage of female majors in each state.

A code segment will be used to swap the values of the variables a and b using the temporary variable temp. Which of the following code segments correctly swaps the values of a and b ? A Choice A has three boxes in a column.In choice A the top box reads a left arrow b, the middle box reads temp left arrow a, and the bottom box reads b left arrow temp. B Choice B has three boxes in a column. In choice B the top box reads temp left arrow a, the middle box reads a left arrow b, and the bottom box reads b left arrow temp. C Choice C has three boxes in a column. In choice C the top box reads temp left arrow a, the middle box reads a left arrow temp, and the bottom box reads b left arrow a. D Choice D has three boxes in a column. In choice D the top box reads temp left arrow a, the middle box reads b left arrow temp, and the bottom box reads a left arrow b.

Answer B This option is correct. The value of variable a is stored in the variable temp. Then the value of the variable b is stored in the variable a. Finally, the value of the variable temp (which now contains the original value of the variable a) is stored in the variable b.

Which of the following is a true statement about cloud computing? A Cloud computing is convenient to implement but has a negative effect on the scalability of systems. B Cloud computing is useful for large businesses but is not useful for individuals. C Storing data using cloud computing can help ensure that data are not lost if a user's computer stops functioning. D Storing data using cloud computing improves security over storing data on a personal computer.

Answer C This option is correct. Cloud computing uses the Internet to store data on servers that are backed up in fail-safe ways. If a user's computer were to stop functioning, the user could access his or her cloud data from another computer.

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? A Compressing the image in a way that may lose information but will suffer only a small loss of image quality. B 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. 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. D Modifying part of the image by taking the pixels in one part of the picture and copying them to the pixels in another part of the picture.

Answer C This option is correct. If a negative of the original image is made, each RGB triplet value will be computed by subtracting the original value from 255. The original value can then be restored by subtracting the new value from 255. This process is lossless because the exact original can be restored.

The procedure below is intended to display the index in a list of unique names (name list) where a particular name (target name) is found. If the target name is not found in the name list, the code should display 0. text... Which of the following procedure calls can be used to demonstrate that the procedure does NOT work as intended? A Find Name (["Andrea", "Ben"], "Ben") B Find Name (["Andrea", "Ben"], "Diane") C Find Name (["Andrea", "Ben", "Chris"], "Ben") D Find Name (["Andrea", "Chris", "Diane"], "Ben")

Answer C This option is correct. The procedure will not display the correct value of found Index if the target Name is "Ben". In the FOR EACH loop, when the value of name is "Andrea", the ELSE statement sets found Index to 0. When the value of name is "Ben", the ELSE statement sets found Index to 1. But as the loop continues, and the value of name is "Chris", the ELSE statement sets found Index to 0. The procedure displays 0, even though the correct answer is 1

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? A The bank can incorporate other factors, such as the number of tellers, in the simulation. B The bank can use the simulation to investigate these two options without causing inconvenience for customers. C The bank may consider new alternatives based on the simulation results. D The simulation will not produce usable results because actual customer data are not available.

Answer D This option is correct. Although actual customer data is not available in the bank's simulation, it can give information that relates the average customer wait time for each option.

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. 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 statement to cause the elevator to move? A (on Floor 1 AND call To 2) AND (on Floor 2 AND call To 1) B (on floor 1 AND call To 2) OR (on Floor 2 AND call To 1) C (on Floor 1 OR call To 2) AND (on Floor 2 OR call To 1) D (on Floor 1 OR call To 2) OR (on floor 2 OR call To 1)

B (on Floor 1 AND call To 2) OR (on floor 2 AND call To 1)


संबंधित स्टडी सेट्स

CHAPTER 7: cooking techniques, herbs, spices, condiments, nuts, flavorings

View Set

Respiratory Failure & Acute Respiratory Distress Syndrome

View Set

Unit 3 Legal & Ethical and Domestic Violence

View Set

Essentials in economics (1-3,6&7)

View Set