P3 - Abstracting & P4

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

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

I, II, and III

cloud computing

the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

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?

(onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

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?

2 3

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?

232 times as many values can be represented.

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

3

In the program below, y is a positive integer (e.g., 1, 2, 3, ...) https://assets.learnosity.com/organisations/537/media.academicmerit.com/f4d7b38e37ea4879d8220b336c11efe3/original.png What is the value of the result after running the program?

3y

Hexadecimal

A base-16 number system that uses sixteen distinct symbols 0-9 and A-F to represent numbers from 0 to 15.

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

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

Binary

A way of representing information using only two options.

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 II always works correctly, but Algorithm I only works correctly when the maximum value is greater than or equal to − 1.

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

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

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?

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

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?

Both program I and program II display the correct sum.

Which of the following statements describes a limitation of using a computer simulation to model a real-world object or system?

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

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?

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.

Consider the following numbers. *Binary 1100 *Decimal 11 *Hexadecimal D Which of the following lists the numbers in order from least to greatest

Decimal 11, Binary 1100, Hexadecimal D

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?

Do the movement patterns of the animal vary according to the weather?

The procedure below is intended to display the index in a list of unique names (nameList) where a particular name (targetName) is found. If targetName is not found in nameList, 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?

FindName (["Andrea", "Ben", "Chris"], "Ben")

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?

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

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?

Grid I only

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?

How many programming statements the program contains

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?

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

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. 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 7 and line 8

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?

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.

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. Two tables are shown, each with two columns. The left column of each is titled Decimal and the right ASCII Character. The first table has values 65 through 77 in the left column and letters A through M in the right column. The second table has values 78 through 90 in the left column and letters N through Z in the right column. What ASCII character is represented by the binary (base 2) number 1001010 ?

J

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?

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

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

Purchasing a single-user copy of photo editing software and installing it on all the computers in a computer lab

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 even, and it otherwise returns false.

The table below shows the time a computer system takes to complete a specified task on the customer data of different-sized companies. The figure shows a table with 4 columns and 5 rows. The top row contains the column labels, from left to right; column 1, Task; column 2, Small Company (approximately 100 customers); column 3, Medium Company (approximately 1,000 customers); column 4, Large Company (approximately 10,000 customers). From top to bottom, the data is as follows: Row 2; Task, Backing up data, Small Company, 2 hours, Medium Company, 20 hours, Large Company, 200 hours. Row 3; Task, Deleting entries from data, Small Company, 100 hours, Medium Company, 200 hours, Large Company, 300 hours. Row 4; Task, Searching through data, Small Company, 250 hours, Medium Company, 300 hours, Large Company, 350 hours. Row 5; Task, Sorting data, Small Company, 0.01 hours, Medium Company, 1 hour, Large Company, 100 hours. 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?

Sorting data

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

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

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 credibility to the information distributed

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?

The computers can communicate directly because Internet communication uses standard protocols.

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

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

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] is not sufficient to conclude the program is correct.

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 packets must be reassembled upon receipt.

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

The output will be true no matter what the value of input B is.

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?

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

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 is a true statement about data compression?

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

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?

V

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?

Web sites that are not visited frequently might no longer be accessible to users.

Web address

Where on the World Wide Web to find a particular website or web page. Also called Uniform Resource Locator or URL the address has three parts to it: http://server/page/ they are: http:// tells the web browser that this is a web address server is the name of the computer to be contacted, like bbc.co.uk or childnet-int.co.uk page is the name of the web page to be read, like index.html. If no page is given then the server sends back the homepage.

sound quality

describes the differences among sounds of the same pitch and loudness

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

https://assets.learnosity.com/organisations/537/media.academicmerit.com/2ba47b17e79709b2cc069e09f9c29d33/original.png

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 grid, black, black, black, black. Consider the procedure MoveAndTurn below. Five lines of block code with some of the lines indented. Begin block Line one: all capital, PROCEDLIRE, Move and Turn, begin block, num Moves closed up with initial capital M, comma, num Turns closed up with initial capital T, end block. Begin block Begin block Line two is indented one tab: all capital REPEAT, num 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, num 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?

https://assets.learnosity.com/organisations/537/media.academicmerit.com/af124ecf8be0c9d5e15b13904e6ad199/original.png

unethical

not morally correct


Ensembles d'études connexes

MKTG 334 EXAM 2 KEY MULTIPLE CHOICE

View Set

Ch 3 National Ownership - Unit 1 : Chapter 4 : Ownership

View Set

Mirrors,Lenses,and the Eye Lesson 3

View Set

PEDS CH 26 prep u immunologic disorders

View Set

Human Anatomy and Physiology CHAPTER 2, Human anatomy and physiology Exam 3, Human Anatomy and Physiology Tissue Review, Human Anatomy and Physiology Review, Essentials of Human Anatomy and Physiology, Human Anatomy and Physiology Lab, TEAS Human Ana...

View Set