pt4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

15

This option is correct. The representation of sound as data involves the computational manipulation of information. For one copy of a song to have a lower sound quality than another copy, a lower ratio of bits per second must have been used.

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?

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?

The user's public key used for encryption D

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 figure shows a table with 2 columns and 5 rows. The top row contains the column labels, from left to right; column 1, Variable; column 2, Description. From top to bottom, the data is as follows: Row 2; Variable, onFloor1, Description, set to true if the elevator is stopped on floor 1; otherwise set to false. Row 3; Variable, onFloor2, Description, set to true if the elevator is stopped on floor 2; otherwise set to false. Row 4; Variable, callTo1, Description, set to true if the elevator is called on floor 1; otherwise set to false. Row 5; Variable, callTo2, Description, set to true if the elevator is called on floor 2; otherwise set to false. 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?

(onFloor1 OR callTo2) AND (onFloor2 OR callTo1)

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?

10 times as many items can be uniquely identified.

In the program below, y is a positive integer (e.g., 1, 2, 3, ...) A segment of code is shown. At the top is a white box that reads result left arrow 0. This is at the top left corner of a larger grey box, at the top of which it reads REPEAT 3 TIMES. Below this in the grey box and indented is a smaller grey box with a white border that reads REPEAT y TIMES at the top. There is a smaller white indented box inside this smaller grey box that reads result left arrow result plus 1. What is the value of result after running the program?

3y

The figure below represents a network of physically linked computers labeled A through G. 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. A diagram of a network is shown. The letters A through G are shown, each in a circle. A is in the lower left. B is to the right of A, and connected to it by a straight line. C is to the right and up from B, and connected to it by a straight line. D is to the right and up from C, and it is connected to C by a straight line and to B by a curved line that goes around C from below. E is to the left and down from D, directly above B. E is connected to D, C, and A by straight lines. F is to the right of E, above and to the left of A. F is connected to E and A by straight lines. G is to the right and up from F, directly above A and to the left of D. G is connected to F and D by straight lines. 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?

4

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 user browsing in an anonymous window will be protected from viruses launched from any Web sites visited or files downloaded.

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. Algorithm I : Set the value of a variable max to − 1. Iterate through the list of integer values. If a data value is greater than the value of the variable max, set max to the data value. Algorithm II : Set the value of a variable max to the first data value. Iterate through the remaining values in the list of integers. If a data value is greater than the value of the variable max, set max to the data value. Which of the following statements best describes the behavior of the two algorithms?

Algorithm I always works correctly, but Algorithm II only works correctly when the maximum value is not the first value in the list.

There are 32 students standing in a classroom. Two different algorithms are given for finding the average height of the students. Algorithm A Step 1: All students stand. Step 2: A randomly selected student writes his or her height on a card and is seated. Step 3: A randomly selected standing student adds his or her height to the value on the card, records the new value on the card, and is seated. The previous value on the card is erased. Step 4: Repeat step 3 until no students remain standing. Step 5: The sum on the card is divided by 32. The result is given to the teacher. Algorithm B Step 1: All students stand. Step 2: Each student is given a card. Each student writes his or her height on the card. Step 3: Standing students form random pairs at the same time. Each pair adds the numbers written on their cards and writes the result on one student's card; the other student is seated. The previous value on the card is erased. Step 4: Repeat step 3 until one student remains standing. Step 5: The sum on the last student's card is divided by 32. The result is given to the teacher. Which of the following statements is true?

Algorithm B always calculates the correct average, but Algorithm A does not.

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 ?

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.

The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the center square of the grid and facing toward the top of the grid. A five by five square grid is shown. A triangle pointing up is shown in the box in the center of the grid, in the third row and third column. The following code segment is used to move the robot within the grid. text... A gray square represents a possible final location of the robot after the code segment is executed. Which of the following represents all possible final locations for the robot?

Choice B is a five by five square grid with a triangle pointing up in the center square, in the third column and third row. In choice B the squares in the third row in the first, second, fourth, and fifth columns, and in the third column in the fourth and fifth rows, are shaded grey..

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

Cloud computing is convenient to implement but has a negative effect on the scalability of systems.

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?

Does the animal travel in groups with other tracked animals?

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?

In all cases, a binary search of a sorted list requires fewer comparisons than a linear search.

A programmer wrote the code segment below to display the average of all the elements in a list called numbers. There is always at least one number in the list. text... 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?

Interchanging line 5 and line 6

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?

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.

Two grids are shown below. Each grid contains a robot represented as a triangle. Both robots are initially facing left. Each robot can move into a white or gray square, but cannot move into a black region. Two grids are shown, each three boxes across and five boxes high. The grid on the left is labeled Grid 1 and the grid on the right is labeled Grid 2. Each grid has a grey square in the upper left corner and an arrow pointing to the left in the square in the lower right corner. In Grid 1 the first two squares in the second row and the last two squares in the fourth row are black. In Grid 2 the first and third squares in the second row, the third square in the third row, and the last two squares in the fourth row are black. The remaining squares are white in both grids. For each grid, the program below is intended to move the robot to the gray square. The program uses the procedure Goal_Reached ( ), which evaluates to true if the robot is in the gray square and evaluates to false otherwise. text... For which of the grids does the program correctly move the robot to the gray square?

Neither grid I nor grid II

An Internet service provider (ISP) is considering an update to its servers that would save copies of the Web pages most frequently visited by each user. Which of the following is LEAST likely to occur as a result of the update?

Privacy of users might be negatively affected. B

Programs I and II below are each intended to calculate the sum of the integers from 1 to n. Assume that n is a positive integer (e.g., 1, 2, 3, ...). Two segments of code is shown. The code on the left has the title Program 1, and the code on the right has the title Program 2. At the top of each are two white boxes on top of each other that read i left arrow n in the top box and result left arrow 0 in the bottom box. This is at the top left corner of a larger grey box, at the top of which it reads REPEAT n TIMES. Below this in the grey box and indented is a white box with two smaller white boxes inside on top of each other. The top box reads result left arrow result plus i. The bottom box reads i left arrow i plus 1 in Program 1 and i left arrow i minus 1 in Program 2. Below the larger grey box at its lower left corner is a white box that reads DISPLAY, then result, which is in a rectangle. Which of the following best describes the behavior of the two programs?

Program I displays the correct sum, but program II does not.

Which of the following is a true statement about data compression?

Regardless of the compression technique used, once a data file is compressed, it cannot be restored to its original state.

Which of the following is considered an unethical use of computer resources?

Searching online for an electronic version of a school textbook

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?

The ability to provide media-rich content for low cost

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

The ability to use multiple protocols such as hypertext transfer protocol (HTTP), Internet protocol (IP), and simple mail transfer protocol (SMTP) to transfer data

In the procedure Mystery below, the parameter number is a positive integer. text... Which of the following best describes the result of running the procedure Mystery?

The procedure returns true when the initial value of number is greater than 2, and it otherwise returns false.

A programmer wrote the program below. The program uses a list of numbers called numList. The program is intended to display the sum of the numbers in the list. A segment of code is shown. At the top is a white box that reads sum left arrow numList, then the number 1 in a square. This is at the top left corner of a larger grey box, at the top of which it reads FOR EACH value IN numList. Below this in the grey box and indented is a white box that reads sum left arrow sum plus value. Below the larger grey box at its lower left corner is a white box that reads DISPLAY, then sum, which is in a rectangle. 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?

The conclusion is incorrect; using the test case [0, 1, 4, 5] only confirms that the program works for lists in increasing order.

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?

The result was affected by lossy data compression.

3

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. Related Content & Skills Big Idea BI 3 EK 3.1.1.B EK 3.1.1.D EU 3.1 LO 3.1.1 Computational Thinking Practices

The program segment below is intended to move a robot in a grid to a gray square. The program segment uses the procedure GoalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise. The robot in each grid is represented as a triangle and is initially facing left. The robot can move into a white or gray square but cannot move into a black region. text... For which of the following grids does the program NOT correctly move the robot to the gray square?

The figure shows a grid of squares with three columns and five rows. One square is gray and the others are either black or white. One of the squares contains a left-facing triangle, representing a robot. The white squares represent a path through the grid that staffs at the robot's square and ends at the gray square. Choice A: The squares of the grid are filled as follows, from left to right and top to bottom: Row one: white white, gray. Row two: white black, black. Row three: white black, black. Row four: white black, black. Row five: white white robot facing left.

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?

The file is broken into packets for transmission. The user's browser must request each packet in order until all packets are received.

Consider the following program code. The block code consists of seven lines with some of the lines indented. Line one: begin block, lowercase i left arrow zero end block. Line two: begin block, sum left arrow zero end block. Begin block Line three: all capital REPEAT UNTIL, begin block, lowercase i equals four, end block. Begin block. Line four is indented one tab: begin block, i left arrow one end block. Line five is indented one tab: begin block, sum left arrow sum plus lowercase i, end block. Line six is indented one tab: begin block, lowercase i left arrow lowercase i plus one end block. End block, end block. Line seven: begin block, all capitals DISPLAY, begin block, sum, end block. End block. Which of the following best describes the result of running the program code?

The number 10 is displayed.

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. A table is shown with four columns titled Day and Date, Movie Title, City, and Number of Times Purchased. The first row reads Saturday 1/5/2014, Movie A, Houston Texas, and 1. The second row reads Saturday 1/5/2014, Movie A, Detroit Michigan, and 2. The third row reads Saturday 1/5/2015, Movie B, Houston Texas, and 1. The fourth row reads Saturday 1/5/2014, Movie C, Anchorage Alaska, and 1. The fifth row reads Sunday 1/6/2014, Movie A, Wichita Kansas, and 3. Which of the following CANNOT be determined using only the information in the database?

The number of movies purchased by an individual subscriber for a particular month

7

This option is correct. The value of the variable result is initially set to 0. The outer REPEAT block is executed three times, and the inner REPEAT block is executed y times. Any block inside both of these blocks will be executed 3y (3 multiplied by y) times. Since the innermost block increases the value of the variable result by 1, the final value of the variable result is 3y.

17

This option is incorrect. Algorithm I does not work correctly when the maximum value is less than -1. Algorithm II works correctly in all cases.

2

This option is incorrect. Although the program will not move the robot to the gray square in Grid II, it will correctly move the robot to the gray square in Grid I.

5

This option is incorrect. By storing Web pages frequently visited by each user, a user's preferences, interests, or transactions could be monitored. This would have a negative impact on the user's privacy.

13

This option is incorrect. Cloud computing uses the Internet to store data on servers. Because cloud computing servers have a tremendous capacity, systems that rely on cloud computing do not have scalability issues.

18

This option is incorrect. Compression techniques are not used in the addition of numbers.

12

This option is incorrect. If the initial value of number is 3, the REPEAT UNTIL loop will reduce the value of number to 1, and then to -1, at which point the loop will terminate. The procedure would return false for a value of number greater than 2, which contradicts this statement.

8

This option is incorrect. If the target value was the first element in a list of many elements, the linear search would require fewer comparisons.

4

This option is incorrect. In order to answer this question, the data set would need to contain information identifying the name of the college.

10

This option is incorrect. In program II, the value of i starts at n and finishes at 1, so that result stores the sum of n + (n - 1) + ... + 3 + 2 + 1. This is the same as 1 + 2 + 3 + ... + n.

11

This option is incorrect. In public key encryption, a person or organization who wants to receive encrypted information via the Internet posts their public key for anyone to use. By its nature, this key is meant to be public and thus does not compromise personal privacy.

19

This option is incorrect. Online searches themselves are ethical, even if for copyrighted materials.

6

This option is incorrect. The ability to use multiple protocols is not affected by how packets are routed.

14

This option is incorrect. The test case [0, 1, 4, 5] does not confirm that the program works for lists in increasing order. For instance, the program gives a result of 11 for the test case [1, 2, 3, 4], but the correct sum is 10.

1

This option is incorrect. The value of variable b is stored in the variable a. Then the value of the variable a (which now contains the original value of the variable b) is stored in the variable temp. Finally, the value of the variable temp (which now contains the original value of the variable b) is stored in the variable b. Both a and b store the original value of b.

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?

Which college has the highest number of students majoring in computer science? D

According to the domain name system (DNS), which of the following is a subdomain of the domain example.com?

example.org


Kaugnay na mga set ng pag-aaral

Chapter 1-Corporate Finance and the Financial Manager

View Set

Soil and Agriculture- Environmental Science

View Set

Chapter 6 : critical thinking and reasoning

View Set