ap comp

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

to be eligible for a particular ride at an amusement park, a person must be at least 12 years old and must be between 50 and 80 inches tall, inclusive. let age represent a persons age in years and let height represent the persons height, in inches. which of the following expressions evaluates to rue if and only if the person is eligible for the ride.

(age >/= 12) and ((height >/ 50) and (height </=80)

A student wants to count the number of restaurants in the spreadsheet whose price range is $30 or less and whose average customer rating is at least 4.0. For a given row in the spreadsheet, suppose prcRange contains the price range as a string and avgRating contains the average customer rating as a decimal number. Which of the following expressions will evaluate to true if the restaurant should be counted and evaluates to false otherwise?

(avgRating ˛ 4.0) AND ((prcRange = "lo") OR (prcRange = "med"))

Based on the algorithm represented in the flowchart, what value is displayed if j has the initial value 3 and k has the initial value 4 ?

12

the player controls a particular video game are represented by numbers. the controls and their corresponding binary values are shown in the following table

24

A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory?

7

A sorted list of numbers contains 128 elements. Which of the following is closest to the maximum number of list elements that can be examined when performing a binary search for a value in the list?

8

Which of the following best describes a challenge involved in using a parallel computing solution?

A parallel computing solution may not be appropriate for an algorithm in which each step requires the output from the preceding step.

Which of the following best exemplifies the use of keylogging to gain unauthorized access to a computer system?

A user unintentionally installs a program on their computer that records all user input and forwards it to another computer. A few weeks later, someone else is able to access the user's computer using the recorded data.

A company delivers packages by truck and would like to minimize the length of the route that each driver must travel in order to reach n delivery locations. The company is considering two different algorithms for determining delivery routes. Algorithm I: Generate all possible routes, compute their lengths, and then select the shortest possible route. This algorithm does not run in reasonable time. Algorithm II: Starting from an arbitrary delivery location, find the nearest unvisited delivery location. Continue creating the route by selecting the nearest unvisited location until all locations have been visited. This algorithm does not guarantee the shortest possible route and runs in time proportional to . Which of the following best categorizes algorithm II?

Algorithm II uses a heuristic approach to provide an approximate solution in reasonable time.

Individuals sometimes attempt to remove personal information from the Internet. Which of the following is the LEAST likely reason the personal information is hard to remove?

All personal information is stored online using authentication measures, making the information hard to access

which of the following best explains how an analog audio signal is typically represented by a computer?

An analog audio signal is measured at regular intervals. Each measurement is stored as a sample, which is represented at the lowest level as a sequence of bits.

Which of the following is an example of an attack using a rogue access point?

An unauthorized individual gains the ability to view network traffic by connecting to a network router that uses weak or no security measures.

Which of the following is NOT a benefit of collaborating to develop a computing innovation?

Collaboration eliminates the need to resolve differences of opinion.

Which of the following research proposals is most likely to be successful as a citizen science project?

Collecting pictures of birds from around the world that can then be analyzed to determine how location affects bird size

Which of the following best explains how data is transmitted on the Internet?

Data is broken into packets, which can be sent along different paths.

The figure below represents a network of physically linked devices labeled A through I. A line between two devices indicates that the devices can communicate directly with each other. Any information sent between two devices that are not directly connected must go through at least one other device. For example, in the network represented below, information can be sent directly between A and B, but information sent between devices A and G must go through other devices.

Four

A local router is configured to limit the bandwidth of guest users connecting to the Internet. Which of the following best explains the result of this configuration as compared to a configuration in which the router does not limit the bandwidth?

Guest users will be restricted in the maximum amount of data that they can send and receive per second.

A student is developing an algorithm to determine which of the restaurants that accept credit cards has the greatest average customer rating. Restaurants that have not yet received any customer ratings and restaurants that do not accept credit card are to be ignored. Once the algorithm is complete, the desired restaurant will appear in the first row of the spreadsheet. If there are multiple entries that fit the desired criteria, it does not matter which of them appears in the first row. The student has the following actions available but is not sure of the order in which they should be executed. Assume that applying either of the filters will not change the relative order of the rows remaining in the spreadsheet. Which of the following sequences of steps can be used to identify the desired restaurant? I. Filter by number of ratings, then filter by payment type, then sort by rating II. Filter by number of ratings, then sort by rating, then filter by payment type III. Sort by rating, then filter by number of ratings, then filter by payment type

I, II, and III

The grid below contains a robot represented as a triangle, initially facing toward the top of the grid. The robot can move into a white or gray square but cannot move into a black region The code segment below uses the procedure goalReached, which evaluates to true if the robot is in the gray square and evaluates to false otherwise.

IF(CAN_MOVE(left)) { ROTATE_LEFT() } MOVE_FORWARD()

Which of the following statements is true about the network?

If devices B and F fail, then device A will not be able to communicate with device G.

A city maintains a database of all traffic tickets that were issued over the past ten years. The tickets are divided into the following two categories. • Moving violations • Nonmoving violations The data recorded for each ticket include only the following information. • The month and year in which the ticket was issued • The category of the ticket Which of the following questions CANNOT be answered using only the information in the database?

In the past ten years, were nonmoving violations more likely to occur on a weekend than on a weekday?

Businesses have the ability to target advertisements to different groups of people who use RunRoutr. Which of the following groups is LEAST likely to receive targeted advertisements?

Individuals who sign up for a premium account

A certain social media application is popular with people across the United States. The developers of the application are updating the algorithm used by the application to introduce a new feature that allows users of the application with similar interests to connect with one another. Which of the following strategies is LEAST likely to introduce bias into the application?

Inviting a random sample of all users to try out the new algorithm and provide feedback before it is released to a wider audience

A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements. Line 1: PROCEDURE isIncreasing(numberList) Line 2: { Line 3: count ← 2 Line 4: REPEAT UNTIL(count > LENGTH(numberList)) Line 5: { Line 6: IF(numberList[count] < numberList[count - 1]) Line 7: { Line 8: RETURN(true) Line 9: } Line 10: count ← count + 1 Line 11: } Line 12: RETURN(false) Line 13: } Which of the following changes is needed for the program to work as intended?

Lines 8 and 12 should be interchanged.

Which of the following is a true statement about the use of public key encryption in transmitting messages?

Public key encryption enables parties to initiate secure communications through an open medium, such as the Internet, in which there might be eavesdroppers.

which of the following best describes a direct benefit in using redundant routing on the internet

Redundancy often allows messages to be sent on the network even if some network devices or connections have failed.

A state government is attempting to reduce the digital divide. Which of the following activities has the greatest potential to contribute to the digital divide rather than reducing it?

Requiring applicants for government jobs to apply using an online platform

A certain computer has two identical processors that are able to run in parallel. The following table indicates the amount of time it takes to execute each of four processes on a single processor. Assume that none of the processes is dependent on any of the other processes. Which of the following parallel computing solutions would minimize the amount of time it takes to execute all four processes?

Running processes P and Q on one processor and processes R and S on the other processor

Each student at a school has a unique student ID number. A teacher has the following spreadsheets available. • • • • Spreadsheet I contains information on all students at the school. For each entry in this spreadsheet, the student name, the student ID, and the student's grade point average are included. Spreadsheet II contains information on only students who play at least one sport. For each entry in this spreadsheet, the student ID and the names of the sports the student plays are included. Spreadsheet III contains information on only students whose grade point average is greater than 3.5. For each entry in this spreadsheet, the student name and the student ID are included. Spreadsheet IV contains information on only students who play more than one sport. For each entry in this spreadsheet, the student name and the student ID are included. The teacher wants to determine whether students who play a sport are more or less likely to have higher grade point averages than students who do not play any sports. Which of the following pairs of spreadsheets can be combined and analyzed to determine the desired information?

Spreadsheets I and II

A list of numbers has n elements, indexed from 1 to n. The following algorithm is intended to display true if the value target appears in the list more than once and to display false otherwise. The algorithm uses the variables position and count. Steps 4 and 5 are missing. Step 1: Set count to 0 and position to 1. Step 2: If the value of the element at index position is equal to target, increase the value of count by 1. Step 3: Increase the value of position by 1. Step 4: (missing step) Step 5: (missing step) Which of the following could be used to replace steps 4 and 5 so that the algorithm works as intended?

Step 4: Repeat steps 2 and 3 until the value of position is greater than n. Step 5: If count is greater than or equal to 2, display true. Otherwise, display false.

In which of the following situations would it be most appropriate to choose lossy compression over lossless compression?

Storing music files on a smartphone in order to maximize the number of songs that can be stored

Which of the following best explains how symmetric encryption algorithms are typically used?

Symmetric encryption uses a single key that should be kept secret. The same key is used for both encryption and decryption of data.

Which of the following statements about the Internet is true?

The Internet is designed to scale to support an increasing number of users.

A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing the program, a software developer discovers that some values appear to be mathematically imprecise. Which of the following is the most likely cause of the imprecision?

The account balances are represented using a fixed number of bits, resulting in round-off errors

An online gaming company is introducing several new initiatives to encourage respectful communication between players of online games. Which of the following best describes a solution that uses crowdsourcing?

The company allows individual players to endorse fellow players based on courteous interactions. Once a player receives enough endorsements, the player is given free rewards that can be used during gameplay.

The author of an e-book publishes the e-book using a no-rights-reserved Creative Commons license. Which of the following best explains the consequences of publishing the book with this type of license?

The contents of the e-book will be encrypted and can only be decrypted by authorized individuals.

A video-streaming Web site keeps count of the number of times each video has been played since it was first added to the site. The count is updated each time a video is played and is displayed next to each video to show its popularity. At one time, the count for the most popular video was about two million. Sometime later, the same video displayed a seven-digit negative number as its count, while the counts for the other videos displayed correctly. Which of the following is the most likely explanation for the error?

The count for the video became larger than the maximum value allowed by the data type used to store the count.

Adrianna uses RunRoutr to suggest a running route. All compatible users near Adrianna receive a notification that shows her running route. Which of the following data is not obtained using data collected from Adrianna's smartphone but necessary for RunRoutr to share Adrianna's running route?

The current locations of other RunRoutr users

A binary number is to be transformed by appending three 0s to the end of the number. For example, 11101 is transformed to 11101000. Which of the following correctly describes the relationship between the transformed number and the original number?

The transformed number is 8 times the value of the original number.

Which of the following data must be collected from a user's smartphone in order for RunRoutr to suggest a running route?

The user's geographic position

Which of the following best explains the ability to solve problems algorithmically?

There exist some problems that cannot be solved algorithmically using any computer.

Which of the following best explains how devices and information can be susceptible to unauthorized access if weak passwords are used?

Unauthorized individuals can use data mining and other techniques to guess a user's password.

Which of the following is most likely to be a data privacy concern for RunRoutr users?

Users of the application may have the ability to determine information about the locations of users that are not on their contact lists.

Which of the following is most likely to be a benefit to users of the application?

Users of the application may see health benefits as a result of the application encouraging them to exercise with each other.

which of the following is an example of a phishing attack

Using fraudulent e-mails in order to trick a user into voluntarily providing sensitive information

Delivery trucks enter and leave a depot through a controlled gate. At the depot, each truck is loaded with packages, which will then be delivered to one or more customers. As each truck enters and leaves the depot, the following information is recorded and uploaded to a database. • The truck's identification number • The truck's weight • The date and time the truck passes through the gate • Whether the truck is entering or leaving the depot Using only the information in the database, which of the following questions CANNOT be answered?

What is the average number of customer deliveries made by each truck on a particular day?

A scientist wants to investigate several problems. In which of the following situations is using a simulation LEAST suitable for solving a problem?

When the solution to the problem requires real-world data inputs that are continually measured at regular intervals.

which of the following best exemplifies the use of multi factor authentication to protect an online banking system

after entering a password for an online bank account, a user must also enter a code that is sent to the users phone via text message

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list. For example, if utensils initially contains ["fork", "spoon", "tongs", "spatula", "whisk"], it should contain ["whisk", "fork", "spoon", "tongs", "spatula"] after executing the code segment. Which of the following code segments transforms the list as intended?

len ← LENGTH(utensils) temp ← utensils[len] REMOVE(utensils, len) INSERT(utensils, 1, temp)

which of the following best explains the relationships between the internet and world wide web

the internet is a network of interconnected networks, and the world wide web is a system of linked pages, programs, and files that is accused via the internet

what control is represented by the decimal value 15


Ensembles d'études connexes

US History Unit three Study Guide

View Set

Quiz -- Chapter 15 - Business 101

View Set

Davis Ch. 8: Fluid & Fluid Imbalances

View Set

Chapter 61: Management of Patients with Dermatologic Disorders

View Set

Chapter 5: Trauma, Anxiety, Obsessive-complusive

View Set

Baltic States and Border Nations: 19.4

View Set

Functional Histology of Reproduction

View Set

O&I sheet 4- Extensor pollicis longus- abductor pollicis longus

View Set