P3 & P4 exam questions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang 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 Consider the following code segment, which moves the robot in the grid. 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. Related Content & Skills Big Idea BI 5 EK 5.2.1.A EK 5.2.1.B EU 5.2 LO 5.2.1 Computational Thinking Practices P3 - Abstracting

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.

The figure below shows a circuit composed of two logic gates. The output of the circuit is true. Figure showing a logical circuit. From top to bottom, the circuit begins with two circles side by side. The circle on the left is labeled false and the circle on the right is labeled A. An arrow points down from each circle and points to a rectangle labeled OR. Just below and to the left of the rectangle is another circle labeled true. An arrow points down from the rectangle and from the circle to a rectangle labeled AND. An arrow points from this rectangle down to the word true. Which of the following is a true statement about input A? A Input A must be true. B Input A must be false. C Input A can be either true or false. D There is no possible value of input A that will cause the circuit to have the output true. Related Content & Skills Big Idea BI 2 EK 2.2.3.E EK 2.2.3.F EU 2.2 LO 2.2.3 Computational Thinking Practices P3 - Abstracting

A Input A must be true.

A summer camp offers a morning session and an afternoon session. The list morning list contains the names of all children attending the morning session, and the list afternoon list contains the names of all children attending the afternoon session. Only children who attend both sessions eat lunch at the camp. The camp director wants to create the lunch list, which will contain the names of children attending both sessions. The following code segment is intended to create lunch list, which is initially empty. It uses the procedure Is Found (list, name), which returns true if name is found in list and returns false otherwise. text... Which of the following could replace <MISSING CODE> so that the code segment works as intended? A text... B text... C text... D text... Related Content & Skills Big Idea BI 5 EK 5.3.1.G EK 5.3.1.L EU 5.3 LO 5.3.1 Computational Thinking Practices P3 - Abstracting

A text...

The diagram below shows a circuit composed of two logic gates labeled OR and AND. Each gate takes two inputs and produces a single output. A circuit diagram is shown. At the top are two circles next to each other. The left circle reads A and the right circle reads B. There are arrows pointing down from both circles to the top of a box that reads OR. An arrow points from the bottom of the box reading OR to the top of a box reading AND. Another circle is below the box reading OR. The circle reads C and there is an arrow pointing down from this circle to the top of the box reading AND. An arrow points down from the bottom of the box reading AND to the word output. If the inputs A and C are both true, which of the following best describes the output of the AND gate? A The output will be true no matter what the value of input B is. B The output will be false no matter what the value of input B is. C The output will be true if input B is true; otherwise it will be false. D The output will be false if input B is true; otherwise it will be true.

Answer A This option is correct. Because the value of input A is true, the resulting value coming out of the OR gate must be true. Because the value of input C is true, the resulting value coming out of the AND gate is true. The value of input B did not affect this result.

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. B The file is broken into packets for transmission. The user's browser must request each packet in order until all packets are received. C The server attempts to connect directly to the user's computer. If the connection is successful, the entire file is sent. If the connection is unsuccessful, an error message is sent to the user. D The server repeatedly attempts to connect directly to the user's computer until a connection is made. Once the connection is made, the entire file is sent.

Answer A This option is correct. Digital data on the Internet is sent by breaking data into blocks of bits called packets. The packets are reassembled by the user's computer.

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? A Grid I only B Grid II only C Both grid I and grid II D Neither grid I nor grid II

Answer A This option is correct. In Grid I, the robot moves forward to the end of the bottom row, turns right twice, moves forward twice, turns right twice, moves forward until the end of the middle row, turns left twice, moves forward twice, turns left twice, and moves forward until Goal_Reached is true.

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. B The program can also be expressed as binary code, which will reduce the likelihood of errors. C The program cannot be expressed as binary code, because binary code can only be used to represent data. D Some parts of the program can be expressed as binary code, but operations must be expressed using a higher-level programming language.

Answer A This option is correct. Nearly all programming languages, including binary code, are equivalent in terms of being able to express a given algorithm. Higher-level programming languages make it easier for people to read and write a program.

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.

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.

Answer A 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 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? A In all cases, a binary search of a sorted list requires fewer comparisons than a linear search. B Generally, the advantage of using a binary search over a linear search increases as the size of the list increases. C A linear search will generally run faster than a binary search because a linear search requires fewer lines of code to implement. D Using a linear search is preferable to using a binary search if there is a chance that the target may not be found in the list.

Answer B This option is correct. A binary search on a sorted list compares the target value to the middle value in the list. If that value is not the target value, the search continues on either the lower half or the upper half of the list, depending on whether the target value was lower than or greater than the number in the middle of the list. This process is repeated on each sublist until the target is found or there is no sublist to search. Due to this halving process, a binary search is more efficient than a linear search. As the size of the list increases, the improvement in search efficiency increases.

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.

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.

Answer B This option is correct. Connecting new devices to the Internet is enabled by the assignment of an IP address

Consider the following numbers. Binary 1100 Decimal 11 Hexadecimal D Which of the following lists the numbers in order from least to greatest? A Binary 1100, Decimal 11, Hexadecimal D B Decimal 11, Binary 1100, Hexadecimal D C Decimal 11, Hexadecimal D, Binary 1100 D Hexadecimal D, Decimal 11, Binary 1100

Answer B This option is correct. Converted to decimal, hexadecimal D equals decimal 13 and binary 1100 equals decimal 12. The list 11, 12, 13 is in order from least to greatest.

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.

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? A The ability to distribute information instantaneously B The ability to provide credibility to the information distributed C The ability to provide information that is widely accessible D The ability to provide media-rich content for low cost

Answer B This option is correct. Online newspapers are usually run out in the open, in that the people who create the newspaper are clearly noted on the website. In addition, these online newspapers are often connected to physical newspapers, which are considered credible sources of information.

The procedure Draw (length, direction) is used to draw a line segment length units long in a given direction (left, right, up, or down), starting at the current cursor position. The cursor is then repositioned at the end of the line segment that was drawn. Consider the following program, where the cursor starts in the upper left corner of a grid of dots. The dots are spaced one unit apart. Draw (1, right) Draw (2, down) Draw (1, left) Draw (1, right) Draw (1, up) Draw (1, left) Which of the following represents the figure that is drawn by the program? A Choice A shows a three by three square grid of dots with line segments connecting certain dots. In choice A there are line segments in the first column connecting the first to second and second to third dots, and in all three rows connecting the first and second dots. B Choice B shows a three by three square grid of dots with line segments connecting certain dots. In choice B there are line segments in the second column connecting the first to second and second to third dots, and in all three rows connecting the first and second dots. C Choice C shows a three by three square grid of dots with line segments connecting certain dots. In choice C there are line segments in the second column connecting the first to second and second to third dots, in the first and third rows connecting the first and second dots, and in the second row connecting the second and third dots. D Choice D shows a three by three square grid of dots with line segments connecting certain dots. In choice D there are line segments in the first column connecting the second and third dots, in the second column connecting the first and second dots, and in all three rows connecting the first and second dots.

Answer B This option is correct. The cursor in this case starts at the top left of the figure in B and ends at the left-middle point of the figure.

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

Answer B This option is correct. The number of statements in a program is not likely to affect how a program will handle larger data sets. The efficiency of a program is independent of the number of statements it contains. There are some programs with very few statements that take a long time to execute, as well as programs with many statements that take little time to execute.

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? A Choice A 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 A the squares just above, below, to the right, and to the left of the triangle are shaded grey, in the third column and second and fourth rows, and the third row and second and fourth columns. B 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.. C Choice C 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 C the squares in the third row in the first, second, fourth, and fifth rows, and in the third row in the fourth and fifth columns, are shaded grey. D Choice D 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 D all the squares in the third row and all the squares in the third column are shaded grey except the center square that is in both the third column and row. Answer C This option is incorrect. The robot turns right one, two, or three times and could end up in a square to the left of its initial position. It cannot end up in a square above its initial position. Related Content & Skills Big Idea BI 4 EK 4.2.4.B EU 4.2 LO 4.2.4 Computational Thinking Practices P4 - Analyzing Problems and Artifacts

Answer B This option is correct. The robot turns to the right one, two, or three times and then moves one or two squares forward. The possible final locations are to the right, below, or to the left of the starting position.

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? A y + 3 B 3y C y3 D 3y

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

A code segment will be used to swap the values of 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.

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.

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? A 1 B 2 C 3 D 4

Answer C This option is correct. Any line between two computers represents a way for them to communicate with each other, and a communication between two computers can go through other computers. If the links from F to G, from F to A, and from F to E were broken, it would not be possible for computers E and F to communicate.

A programmer wrote the program below. The program uses a list of numbers called number List. 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 number List, 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 number List. 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 number List 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? A The conclusion is correct; the program works as intended. B The conclusion is incorrect; the program does not display the correct value for the test case [0, 1, 4, 5]. C The conclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct. D The conclusion is incorrect; using the test case [0, 1, 4, 5] only confirms that the program works for lists in increasing order.

Answer C This option is correct. Because the variable sum is initialized to store the value of the first element of number List, and because the iteration block is a FOR EACH loop, the value of the first element is added to sum twice. Since the first element of the list is 0, adding this number to the sum does not affect the sum. A non-zero first element would give an incorrect result. In general, a single test case is not sufficient to confirm that a program works as intended.

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.

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? A Both algorithms work correctly on all input values. B Algorithm I always works correctly, but Algorithm II only works correctly when the maximum value is not the first value in the list. C Algorithm II always works correctly, but Algorithm I only works correctly when the maximum value is greater than or equal to − 1. D Neither algorithm will correctly identify the maximum value when the input contains both positive and negative input values.

Answer C This option is correct. If the list contained [-7, -2, -5], algorithm I would initially set the value of max to -1. Since no data value in the list is greater than -1, the value of max would remain -1, which is not the correct behavior. Algorithm II would set the initial value of max to -7, and then change the value of max to -2. For all cases, algorithm II would return the correct maximum value in the list.

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? A Program I displays the correct sum, but program II does not. B Program II displays the correct sum, but program I does not. C Both program I and program II display the correct sum. D Neither program I nor program II displays the correct sum.

Answer C This option is correct. In program I, the value of i starts at 1 and finishes at n, so that result stores the sum of 1 + 2 + 3 + ... + n. 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. Both programs display the correct sum.

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? A 1 1 B 1 2 C 2 3 D 3 2

Answer C This option is correct. Line 1 assigns 1 to r. Line 2 assigns 2 to s. Line 3 assigns 3 to t. Line 4 assigns the value of s, which is 2, to r. Line 5 assigns the value of t, which is 3, to s. Line 6 displays 2. Line 7 displays 3

Which of the following is considered an unethical use of computer resources? A Downloading freeware or shareware onto your home computer B Purchasing a game from an app store and downloading it directly to a mobile device C Purchasing a single-user copy of photo editing software and installing it on all the computers in a computer lab D Searching online for an electronic version of a school textbook

Answer C This option is correct. Single-user copies of software are meant for one individual to use. Computer labs are meant for public use, so installing the software on the computers raises ethical concerns

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? A The procedure returns true when the initial value of number is 2, and it otherwise returns false. B The procedure returns true when the initial value of number is greater than 2, and it otherwise returns false. C The procedure returns true when the initial value of number is even, and it otherwise returns false. D The procedure returns true when the initial value of number is odd, and it otherwise returns false.

Answer C This option is correct. The REPEAT UNTIL statement subtracts 2 from the parameter number until the condition number ≤ 0 is true. After this REPEAT loop ends, the value of number is either 0 (if the original number was even) or -1 (if the original number was odd).

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 the found Index if the target name is "Ben". In the FOR EACH loop, when the value of name is "Andrea", the ELSE statement sets the found index to 0. When the value of the name is "Ben", the ELSE statement sets the found index to 1. But as the loop continues, and the value of name is "Chris", the ELSE statement sets the found Index to 0. The procedure displays 0, even though the correct answer is 1.

ASCII is a character-encoding scheme that uses 7 bits to represent each character. The decimal (base 10) values 65 through 90 represent the capital letters A through Z, as shown in the table below. What ASCII character is represented by the binary (base 2) number 1001010 ?

Answer C This option is correct. The table shows that the letter J is represented by the decimal value 74, which in binary (base 2) is 1001010.

A new bank plans to make customer convenience a... 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.

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? A The computers cannot communicate because different manufacturers use different communication protocols. B The computers can communicate, but additional hardware is needed to convert data packets from one computer's protocol to the other computer's protocol. C The computers can communicate directly only if the messages consist of text; other formats cannot be interpreted across computers. D The computers can communicate directly because Internet communication uses standard protocols.

Answer D This option is correct. Devices on the Internet communicate using standard protocols, which do not depend on the manufacturer.

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? A Interchanging line 1 and line 2 B Interchanging line 5 and line 6 C Interchanging line 6 and line 7 D Interchanging line 7 and line 8

Answer D This option is correct. In the current program, line 7 is performed for each value in the list numbers. If lines 7 and 8 were interchanged, the average would be calculated only once.

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? Using simulation software can save the company money by helping to compare designs early in the process, before prototype cars are built. Using simulation software can help to identify safety issues by providing data about how different mechanical components will interact in a wide variety of situations. The manufacturer can present simulation software to customers to demonstrate different design possibilities. A I and II only B I and III only C II and III only D I, II, and III

Answer D This option is correct. Statement I is correct because software simulations can usually be built before a prototype car. Statement II is correct because simulations can be made that model components and their interactions. Statement III is correct because the results of computer simulations may be useful in presenting design possibilities to customers.

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? A Average response time for user requests might decrease. B Privacy of users might be negatively affected. C Storage requirements for the servers might increase. D Web sites that are not visited frequently might no longer be accessible to users.

Answer D This option is correct. The actions of the ISP will only affect how frequently visited pages are loaded into Web browsers. Pages not saved by the ISP are still accessed as they were before.

An office building has two floors. A computer p... 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 Floor1 AND call To 2) AND (on Floor2 AND call To 1) B (on Floor1 AND call To 2) OR (on Floor2 AND call To 1) C (on Floor1 OR call To 2) AND (on Floor2 OR call To 1) D (on Floor1 OR call To 2) OR (on Floor2 OR call To 1)

B (on Floor1 AND call To 2) OR (on Floor2 AND call To 1)

The figure below shows a robot in a grid of squares. The robot is represented as a triangle, which is initially facing upward. The robot can move into a white or gray square but cannot move into a black region. A 5 by 5 grid, with one gray square and the others either black or white. One of the squares contains a triangle, representing a robot, facing the top of the grid. The white squares represent a path through the grid that staffs at the robot's square and ends at the gray square. The squares of the grid are filled as follows, from left to right and top to bottom: Row one: black, black, black, black, gray. Row two: black, black, black, black, white. Row three: white white white white white. Row four: white, black, black, black, black. Row five: robot facing the top of the grid, black, black, black, black. Consider the procedure Move And Turn below. Five lines of block code with some of the lines indented. Begin block Line one: all capital, PROCEDLIRE, Move and Turn, begin block, number Moves closed up with initial capital M, comma, number Turns closed up with initial capital T, end block. Begin block Begin block Line two is indented one tab: all capital REPEAT, number Moves, closed up with initial capital M, all capital TIMES. Line three is indented two tabs: begin block, all capital, MOVE underscore FORWARD, end block. End block Begin block Line four is indented one tab: all capital REPEAT, number Turns closed up with initial capital T, all capital TIMES. Line five is indented two tabs: begin block, all capital, ROTATE underscore RIGHT, end block. End block End block End block Which of the following code segments will move the robot to the gray square? A Choice A has three boxes in a column. In choice A the top box reads Move And Turn, then 1,2 in a rectangle. The middlebox reads Move And Turn, then 3, 4 in a rectangle. The bottom box reads Move And Turn, then 0, 2 in a rectangle. B Choice B has three boxes in a column. In choice B the top box reads Move and turn, then 2,1 in a rectangle. The middlebox reads Move and turn, then 4, 1 in a rectangle. The bottom box reads Move and turn, then 2, 0 in a rectangle. C Choice C has three boxes in a column. In choice C the top box reads Move and turn, then 2,1 in a rectangle. The middlebox reads Move and turn, then 4, 3 in a rectangle. The bottom box reads Move and turn, then 2, 0 in a rectangle. D Choice D has three boxes in a column. In choice D the top box reads Move and turn, then 3,1 in a rectangle. The middlebox reads Move and turn, then 5, 3 in a rectangle. The bottom box reads Move and turn, then 3, 0 in a rectangle.

C Choice C has three boxes in a column. In choice C the top box reads Move and turn, then 2,1 in a rectangle. The middlebox reads Move and turn, then 4, 3 in a rectangle. The bottom box reads Move and turn, then 2, 0 in a rectangle.

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 best describes the result of using 64-bit integers instead of 32-bit integers? A 2 times as many values can be represented. B 32 times as many values can be represented. C 232 times as many values can be represented. D 322 times as many values can be represented.

C 232 times as many values can be represented.

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? A Algorithm A always calculates the correct average, but Algorithm B does not. B Algorithm B always calculates the correct average, but Algorithm A does not. C Both Algorithm A and Algorithm B always calculate the correct average. D Neither Algorithm A nor Algorithm B calculates the correct average.

C Both Algorithm A and Algorithm B always calculate the correct average

Which of the following statements describes a limitation of using a computer simulation to model a real-world object or system? A Computer simulations can only be built after the real-world object or system has been created. B Computer simulations only run on very powerful computers that are not available to the general public. C Computer simulations usually make some simplifying assumptions about the real-world object or system being modeled. D It is difficult to change input parameters or conditions when using computer simulations.

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

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?

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. ASCII characters can also be represented by hexadecimal numbers. According to ASCII character encoding, which of the following letters is represented by the hexadecimal (base 16) number 56? A A B L C V D Y

C V

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? A The number 0 is displayed. B The number 6 is displayed. C The number 10 is displayed. D Nothing is displayed; the program results in an infinite loop.

D Nothing is displayed; the program results in an infinite loop.

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? A Backing up data B Deleting entries from data C Searching through data D Sorting data

D Sorting data

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? A 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. B 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 B: The squares of the grid are filled as follows from left to right and top to bottom: Row one: gray, white white. Row two: black, black, white. Row three: white white white. Row four: white black, black. Row five: white white robot facing left. C 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 C: The squares of the grid are filled as follows from left to right and top to bottom: Row one: white white, gray. Row two: black, white black. Row three: white white black. Row four: white black, black. Row five: white white robot facing left. D 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 D: The squares of the grid are filled as follows, from left to right and top to bottom: Row one: gray, white white. Row two: black, white black. Row three: white white black. Row four: white black, black. Row five: white white robot facing left. Related Content & Skills Big Idea BI 4 EK 4.2.4.B EU 4.2 LO 4.2.4 Computational Thinking Practices P4 - Analyzing Problems and Artifacts

D 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 D: The squares of the grid are filled as follows, from left to right and top to bottom: Row one: gray, white white. Row two: black, white black. Row three: white white black. Row four: white black, black. Row five: white white robot facing left.

Which of the following is a true statement about data compression? A Data compression is only useful for files being transmitted over the Internet. B Regardless of the compression technique used, once a data file is compressed, it cannot be restored to its original state. C Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user. D There are trade-offs involved in choosing a compression technique for storing and transmitting data.

D There are trade-offs involved in choosing a compression technique for storing and transmitting data.


Kaugnay na mga set ng pag-aaral

Chemistry Final Exam old test questions

View Set

Workshop 2 Who am I? - Quizlet-- Guisman Lemus

View Set

Virginia Real Estate Practice Exams

View Set

Accounting 230 Exam 1- chapter 1

View Set

Anatomy & Physiology Chapter 1 Test Bank

View Set

M1 Introduction to Computing (CCS0002)

View Set