APCSP Semester 2 Final Review

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following is true regarding the use of public key encryption?

Public key encryption allow secure communications through an open medium, such as the Internet, in which there is a risk of someone intercepting the communication.

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

A computer scientist is analyzing four different algorithms used to sort a list. The table below shows the number of steps each algorithm took to sort lists of different sizes. Which algorithm grows at an exponential rate, meaning the number of steps is equal to 2n for a list of size n?

Algorithm B

A computer scientist is analyzing four different algorithms used to sort a list. The table below shows the number of steps each algorithm took to sort lists of different sizes. Which algorithm grows at a factorial rate, meaning the number of steps is equal to n! for a list of size n?

Algorithm C

Based on the values in the table, which of the algorithms appear to run in the most reasonable time?

Algorithm D

Which algorithm grows at a polynomial rate, meaning the number of steps is equal to n2 for a list of size n?

Algorithm D

For which of the following situations would it be best to use a heuristic in order to find a solution that runs in a reasonable amount of time?

Finding the fastest route that visits every location among nlocations, which requires n! possible routes be examined.

A mobile application is used to display local traffic conditions. Which of the following features of the application best exemplifies the use of crowdsourcing?

Users can submit updates on local traffic conditions in real time.

Question: Which of the following is LEAST likely to be a benefit of Snappy?

Users may not rank other user's "Happiness Moments" because they want to stay on the top of the leaderboard

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

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

What will print to the console after running this code segment?

16

A sequential algorithm is broken into three stages Sequential Algorithm TimeDownload stage: 1 minuteSorting stage: 6 minutesUpload stage: 1 minute A parallel version of the algorithm completes the sorting stage in parallel leading to a new set of times Parallel Algorithm TimeDownload stage: 1 minuteSorting stage: 2 minutesUpload stage: 1 minute What is the speedup of the parallel solution?

2 minutes

Which of the follow efficiencies would be considered unreasonable?

2^n

A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed to find the item? [1, 5, 20, 50, 51, 80, 99]

3

What is printed to the console?console.log(15 % 4);

3

A certain computer has two identical processors that are able to run in parallel. The table below indicates the amount of time it takes each processor to execute each of two processes. Assume that neither process is dependent on the other.

30 seconds

listAverage() returns the average number in a list. Which of these functions does this correctly?

3rd

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 statements is most likely true about the differences between the basic version and the premium version of StreamPal?

Users of the basic version of StreamPal indirectly support StreamPal by allowing themselves to receive advertisements.

Which of the following is most likely to be a beneficial effect of using MeeReader?

Users with visual impairments may be able to more easily read or listen to books and articles.

Question: Which of the following is considered a potential effect of the GroceryGrabbr app rather than a function of the GroceryGrabbr app?

Using the app may result in the user being able to spend less time shopping for groceries and more time with their family and friends

An online game collects data about each player's performance in the game. A program is used to analyze the data to make predictions about how players will perform in a new version of the game. The procedure GetPrediction (idNum) returns a predicted score for the player with ID number idNum. Assume that all predicted scores are positive. The GetPrediction procedure takes approximately 1 minute to return a result. All other operations happen nearly instantaneously. Two versions of the program are shown below.

Version II requires approximately 5 more minutes to execute than version I.

The mayor of a city is interested in learning what goals are most important for residents of the city. Members of her staff visit one of the many neighborhoods in the city and ask 20 residents to fill out a survey. The mayor is concerned that the survey may be biased and not accurately reflect the overall interests in her town. Which of the following strategies is MOST likely to address concerns about the data being biased or inaccurate?

Visiting multiple new neighborhoods to collect more survey responses

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.

A search engine has a trend-tracking feature that provides information on how popular a search term is. The data can be filtered by geographic region, date, and category. Categories include arts and entertainment, computers and electronics, games, news, people and society, shopping, sports, and travel. Which of the following questions is LEAST likely to be answerable using the trends feature?

What is the cost of a certain electronics product?

A Web site uses several strategies to prevent unauthorized individuals from accessing user accounts. Which of the following is NOT an example of multifactor authentication?

When a user enters an incorrect password more than two times in a row, the user is locked out of the account for 24 hours.

What is one of the benefits of using a library in a program?

simplifies creating a complex program

Involves one key for both encryption and decryption.

symmetric key encryption

Question: Which of the following data is not obtained using data collection from the smartphone, but is necessary for GroceryGrabbr to create the total cost of groceries on the list?

the cost of groceries

Question: Which of the following data must be obtained from the user's smartphone in order for GroceryGrabbr to suggest the order for picking up groceries?

the grocery list the user input

What is displayed as a result of the procedure call proc2("birthday", "to you") ?

to you happy birthday

For a given row in the spreadsheet, suppose genre contains the genre as a string, num contains the number of copies in stock as a number, and cost contains the cost as a number. Which of the following expressions will evaluate to true if the book should be counted and evaluates to false otherwise?

(genre = "mystery") AND ((1 ≤ num) AND (cost < 10.00))

For a given row in the spreadsheet, suppose genre contains the genre as a string and day contains the day as a string. Which of the following expressions will evaluate to true if the show should be counted and evaluates to false otherwise?

(genre = "talk") AND ((day = "Saturday") OR (day = "Sunday"))

How many values can a function return at a time?

1

You have imported a library with the birthMonth() function. Based on the API, how many strings are entered to calculate the birth month?// calculate birth month based on the day of the month, day of the week, and the birth year// dayMonth {number} - a day of a month from 1 to 31// dayWeek {string} - the name of the day of the week// year {number} - the birth year// return {string} - the month you were bornBirthdayLibrary.birthMonth(dayMonth, dayWeek, year);

1

In the following procedure, the parameter str is a string and the parameter num is a number. PROCEDURE printArgs(str, num){ DISPLAY(num) DISPLAY(str) DISPLAY(num) } Consider the following code segment. printArgs("**", 1) printArgs("*", 2) What is displayed as a result of executing the code segment?

1 ** 1 2 * 2

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

10

The procedure below will be called twice with two numbers provided as arguments to the parameter myNumber. Which of the following pair of numbers will mystery return the same value?

100 and 200

A time stamp indicates the date and time that a measurement was taken. A data scientist has a list containing 10,000 time stamps, sorted in chronological order. Which of the following is closest to the maximum number of values that will need to be examined when performing a binary search for a value in the list?

15

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

8

A certain computer has two identical processors that are able to run in parallel. Each processor can run only one process at a time, and each process must be executed on a single processor. The following table indicates the amount of time it takes to execute each of three processes on a single processor. Assume that none of the processes are dependent on any of the other processes. ProcessExecution Time onEither ProcessorX60 secondsY30 secondsZ50 seconds Which of the following best approximates the minimum possible time to execute all three processes when the two processors are run in parallel?

80 seconds

Which of the following best exemplifies the use of multifactor authentication?

A Web site requires a user to enter a password as well as a numeric code received via text message before the user can log in to an account.

Which of the following best explains how a certificate authority is used in protecting data?

A certificate authority verifies the authenticity of encryption keys used in secured communications.

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

Computers are often used to search through large sets of data to find useful patterns in the data. Which of the following tasks is NOT an example where searching for patterns is needed to produce useful information?

A high school analyzing student grades to identify the students with the top ten highest grade point averages

A student is writing a program that is intended to replace each negative value in a particular column of a spreadsheet with the value 0. Which of the following procedures is most likely to be useful in the student's program?

A procedure findNegative, which returns the row number of the first negative value that appears in the column or -1 if there are no negative values.

Which of the following procedures would be most useful as part of a program to determine whether a word appears in two different text files?

A procedure isFound, which takes a word and a text file as input and returns true if the word appears in the text file

A student has a data file containing 10,000 numerical values. The student is writing a program to compute the average of the numbers contained in the file. Which of the following procedures is most likely to be useful in the student's program?

A procedure that returns the sum of the values in the file

Which of the following programs is most likely to benefit from the use of a heuristic?

A program that finds the shortest driving route between two locations on a map

Question: Which of the following grocery stores is LEAST likely to receive payment from GroceryGrabbr?

A small, local store

Question: Which of the following is the most likely data privacy concern for GroceryGrabbr users?

A user's location is always being tracked

A/An ______ contains specifications for how functions in a library behave and can be used.

API

An individual receives an e-mail that appears to be from an insurance company. The message offers a low insurance rate, and prompts the recipient to click a link to learn more. Which of the following is most indicative that the e-mail is part of a phishing attempt?

After clicking the link, a Web page opens that prompts the recipient for personal information.

Which of the following best exemplifies the use of multifactor authentication to protect an online stock trading system?

After entering a password for an online stock trading account, a user must also enter a code that is sent to the user's phone via text message.

Which algorithm grows at a linear rate, meaning the number of steps increases by a given amount with each new item in the list

Algorithm A

The chart below has a single point for every breed of dog. Each point indicates the maximum weight of that breed and the maximum number of years that breed of dog lives to. Which of the following conclusions is BEST supported by the scatter plot?

All dog breeds that weigh less than 50 pounds have a maximum lifespan of more than 10 years

Which of the following applications is most likely to benefit from the use of crowdsourcing?

An application that allows users to convert measurement units (e.g., inches to centimeters, ounces to liters) An application that allows users to view descriptions and photographs of local landmarks

Which of the following is LEAST likely to indicate a phishing attack?

An e-mail from your bank asks you to call the number on your card to verify a transaction

A town government is designing a new bus system and are deciding where to put the different bus stops. They want to pick the collection of locations that minimizes the distance anyone needs to walk in order to get to at least one bus stop. What term best defines the kind of problem?

An optimization problem

Which of the following best describes the existence of undecidable problems?

An undecidable problem is a problem for which no algorithm can be constructed that always produces a correct output

A function can have:

Any of these options is acceptable

The chart above shows the frequency of searches for the words "pencil" and "pen" over a 5 year period. Which of the following is the best interpretation of the chart above?

At any point in time there are typically more people searching for the word \"pen\" than \"pencil\"

Which of the following additional pieces of information would be most useful in determining the artist with the greatest attendance during a particular month?

Average ticket price

A school is conducting a survey of students to learn more about how they get to school. Students were asked how they travel to school, how long it takes them to get to school, what time they arrive at school, and for a description of their most significant challenges when traveling to school. Several rows of the data collected are shown in the table below. Which column is data will likely be most difficult to visualize or analyze?

Biggest Challenges

The preserve has two databases of information available to use for the exhibit. The first database contains information for each animal's name, classification, skin type, and thermoregulation. The second database contains information for each animal's name, lifestyle, average life span, and top speed. Which of the following explains how the two databases can be used to develop the interactive exhibit?

Both databases are needed. Each database can be searched by animal name to find all information to be displayed.

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

Both program I and program II display the correct sum.

A researcher is interested in learning more about the different kinds of plants growing in different areas of the state she lives in. The researcher creates an app that allows residents of the town to photograph plants in their area using a smartphone and record date, time, and location of the photograph. Afterwards the researcher will analyze the data to try to determine where different kinds of plants grow in the state. Which of the following does this situation best demonstrate?

Citizen science

A restaurant is interested in learning about the food preferences of people living nearby to the restaurant and intends to use survey data to help decide which new items to add to the menu. Which of the following is LEAST likely to be part of the process used to analyze the data?

Cleaning a data visualization to remove unwanted patterns

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

Collecting pictures of plants from around the world that can be analyzed to look for regional differences in plant growth.

What is the third step using Binary Search to look for the number 32 in this list: 1, 2, 3, 4, 10, 11, 16, 25, 32, 33, 45, 47, 51, 69, 75

Compare the number 33 to the given number

In which of the following situations would parallel systems MOST likely be used to help analyze data?

Data analysis involving large datasets

A digital photo file contains data representing the level of red, green, and blue for each pixel in the photo. The file also contains metadata that describes the date and geographic location where the photo was taken. For which of the following goals would analyzing the metadata be more appropriate than analyzing the data?

Determining the likelihood that the photo was taken at a particular public event

A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 counties across the United States. The program is intended to combine county data sets and then process the data. Which of the following is most likely to be a challenge in creating the program?

Different counties may organize data in different ways.

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 chart below has a single point for every breed of dog. Each point indicates the maximum weight of that breed and the maximum number of years that breed of dog lives to. Which of the following conclusions is BEST supported by the scatter plot?

Dog breeds with a higher maximum weight tend to have shorter maximum lifespans

Which of the following is true of algorithms?

Every algorithm can be constructed using combinations of sequencing, selection, and iteration

Which of the following algorithmic efficiencies would be considered LEAST efficient?

Exponential

A school is conducting a survey of students to learn more about how they get to school. Students were asked how they travel to school, how long it takes them to get to school, what time they arrive at school, and for a description of their most significant challenges when traveling to school. Several rows of the data collected are shown in the table below. Which column of data might be able to be visualized or analyzed but first would need to be cleaned?

How Long

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

Which of the following questions about the students who responded to the survey can the teacher answer by analyzing the survey results? I. Do students who enjoy the subject material tend to spend more time on homework each night than the other students do? II. Do students who spend more time on homework each night tend to spend less time studying for tests than the other students do? III. Do students who spend more time studying for tests tend to earn higher grades in the class than the other students do?

I and II

Which of the following are true statements about digital certificates in Web browsers?

I only

For which of the following lists can a binary search be used to search for an item in the list? I. ["blue", "green", "jade", "mauve", "pink"] II. [5, 5, 5, 5, 6, 7, 8, 8, 8] III. [10, 5, 3, 2, -4, -8, -9, -12]

I, II, and III

Which of the following is NOT a reason that a company would typically collect personally identifiable information (PII)?

Making PII digital improves a user's ability to control who has access to it or delete it

I. To determine if a caller frequently uses a specific word II. To estimate the number of phone calls that will be placed next Monday between 10:30 A.M. and noon. III. To generate a list of criminal suspects when given the telephone number of a known criminal

II and III only

Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?

If the first number is greater than the middle number, swap them. Then, if the middle number is greater than the last number, swap them. Then, if the first number is greater than the middle number, swap them.

Consider the goal of modifying the code segment to count the number of squares the robot visits before execution terminates. Which of the following modifications can be made to the code segment to correctly count the number of squares the robot moves to?

Inserting the statement count ← count + n between line 8 and line 9 Inserting the statement count ← count + 1 between line 8 and line 9 Inserting the statement count ← count + 2 between line 6 and line 7

Which of the following is true of two algorithms designed to solve the same problem?

It is possible for two algorithms with different efficiencies to solve the same problem

Which of the following is most likely to be a harmful effect of using FileCleanUp?

It prevents users from accessing infrequently used files when there is no Internet connectivity.

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.

Question: Which of the following may be an unintended effect of the use of Snappy?

Large towns might look "happier" than small towns

The following procedure was developed to determine if a list contains a negative number. If the list contains a negative number it should return true, otherwise it should return false. An error was made in writing this function so that it does not work as intended. Which line of code would need to be fixed in order for the function to work as designed?

Line 03

The algorithm below is used to find the largest element in a list of numbers. By modifying one of the lines in the program it is possible to make the algorithm find the SMALLEST element. Which line would need to be modified and how? 01 target <- list[1]02 FOR EACH num IN list03 {04 IF(num > target)05 {06 target <- num07 }08 }09 DISPLAY(target)

Line 04 becomes IF (num < target)

The developers of a music-streaming application are updating the algorithm they use to recommend music to listeners. Which of the following strategies is LEAST likely to introduce bias into the application?

Making recommendations based on listening data gathered from a random sample of users of the application

A computer science student completes a program and asks a classmate for feedback. The classmate suggests rewriting some of the code to include more procedural abstraction. Which of the following is NOT a benefit of procedural abstraction?

Making the code run faster

Which of the following code segments will move the robot to the gray square?

MoveAndTurn (2,1) (4,3) (2,0)

When the robot reaches the gray square, it turns around and faces the bottom of the grid. Which of the following changes, if any, should be made to the code segment to move the robot back to its original position in the bottom-left square of the grid and facing toward the bottom of the grid?

No change is needed; the algorithm is correct as is.

Is the following function is a good candidate to be placed in a library?

No. It references variables ( player1Points , player2Points ) that are most likely global variables in the original program.

This function checks if a character is a vowel. If it is, it returns true. Otherwise, it returns false.Where should return false; be written in the code?function checkVowel(character){ var vowels = ["a", "e", "i", "o", "u"]; for(var i=0; i<vowels.length; i++){ if(vowels[i] == character){ return true; OPTION A } OPTION B } OPTION C}OPTION D

OPTION C

This algorithm is intended to display a single message based on the temperature. Which works as intended?

Only the left algorithms work as intended

A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in a stack. Their teacher is looking to see if a specific ID number is included in the stack. Which of the following best describes whether their teacher should use a linear or a binary search?

Only the linear search will work since the data has not been sorted

A town decides to publicize data it has collected about electricity usage around the city. The data is freely available for all to use and analyze in the hopes that it is possible to identify more efficient energy usage strategies. Which of the following does this situation best demonstrate?

Open data

A computer program contains code in several places that asks a user to enter an integer within a specified range of values. The code repeats the input request if the value that the user enters is not within the specified range. A programmer would like to create a procedure that will generalize this functionality and can be used throughout the program. The correct use of the procedure is shown below, where min is the least acceptable value, max is the greatest acceptable value, and promptString is the string that should be printed to prompt the user enter a value. inputVal ← getRange(min, max, promptString) Which of the following is a correct implementation of the getRange procedure?

PROCEDURE getRange(min, max, promptString){ DISPLAY(promptString) x ← INPUT() REPEAT UNTIL(x ≥ min AND x ≤ max){ DISPLAY(promptString) x ← INPUT() } RETURN(x)

Which of the following is a correct implementation of updateScore ?

PROCEDURE updateScore(score, amount, limit){ score ← score + amount IF(score > limit){ score ← limit } RETURN(score)

Which of the following is a benefit of parallel and distributed computing?

Parallel computing scales more effectively than sequential computing

Below is an image from Google Trends that plots Cats and Dogs. Choose the most accurate description of what this data is actually showing based on what you know about how Google Trends works.

People search for "dogs" more frequently than "cats"

Question: Which of the following data is necessary for Snappy to display "Happy Moments" for a particular city?

Photos tagged by location that are submitted by any user

Question: Which of the following is the most likely data privacy concern for Snappy users?

Photos uploaded to the app and tagged with location may contain identifiable information like people's faces or street names

A mobile game tracks players' locations using GPS. The game offers special in-game items to players when they visit real-world points of interest. Which of the following best explains how bias could occur in the game?

Points of interest may be more densely located in cities, favoring players in urban areas over players in rural areas.

Which of the following are benefits of procedural abstraction?

Procedural abstraction provides an opportunity to give a name to a block of code that describes the purpose of the code block. Procedural abstraction makes it easier for people to read computer programs.

A computer has two processors that are able to run in parallel. The table below indicates the amount of time it takes either processor to execute four different processes. Assume that none of the processes is dependent on any of the other processes.

Processes W and Z should be assigned to one processor, and processes X and Y should be assigned to the other processor.

Which of the following activities poses the greatest personal cybersecurity risk?

Reserving a hotel room by e-mailing a credit card number to a hotel

The following algorithm is followed by a person every morning when they get up from bed to go to school Wake up Brush teeth Put on shirt Put on pants Put on socks Put on shoes Tie shoes Which concept does this algorithm BEST demonstrate?

Sequencing

A student wants to determine whether a certain problem is undecidable. Which of the following will demonstrate that the problem is undecidable?

Show that for one instance of the problem, no algorithm can be written that is capable of providing a correct yes-or-no answer.

Which of the following best explains how algorithms that run on a computer can be used to solve problems?

Some problems cannot be solved by an algorithm.

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 entry? Select two answers.

Sort by year, then filter by year, then filter by photographer Filter by photographer, then filter by year, then sort by year

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

The figure below shows four grids, each containing a robot represented as a triangle. The robot cannot move to a black square or move beyond the edge of the grid.

Step 1: Keep moving forward, one square at a time, until the square to the right of the robot is no longer black.Step 2: Turn right and move one square forward.Step 3: Repeat steps 1 and 2 three more times.

Historically, it has been observed that computer processing speeds tend to double every two years. Which of the following best describes how technology companies can use this observation for planning purposes?

Technology companies can set research and development goals based on anticipated processing speeds.

A software company is designing a mobile game system that should be able to recognize the faces of people who are playing the game and automatically load their profiles. Which of the following actions is most likely to reduce the possibility of bias in the system?

Testing the system with people of different ages, genders, and ethnicities

A graphic artist uses a program to draw geometric shapes in a given pattern. The program uses an algorithm that draws the shapes based on input from the artist. The table shows the approximate number of steps the algorithm takes to draw different numbers of shapes. Based on the values in the table, which of the following best characterizes the algorithm for drawing n shapes, where n is a very large number?

The algorithm runs in a reasonable amount of time because it will use approximately n2 steps to draw n shapes.

The bank intends to develop the algorithm using machine learning techniques. The algorithm will be trained using data from past loan decisions made by human bankers. Which of the following best describes whether this algorithm will include bias?

The algorithm will likely reflect the human biases in the data used to train it

A software company used to run an algorithm sequentially on one server. As more users start using their app, the company decided to rewrite the program to be parallel. It is now run on four separate servers instead of one Thanks to the use of a parallel algorithm, the same process that used to take 40 minutes to run now only requires 20 minutes. The company is considering purchasing additional computers to decrease the time the program runs even further. Which of the following best describes the impacts of running the parallel algorithm on an even larger number of computers

The algorithm will likely require less time to run though the improvements in efficiency will not be as significant as before.

This graph shows the efficiencies of two different algorithms that solve the same problem. Which of the following is most efficient?

The algorithms have different efficiencies depending on the input size

From the perspective of the application's developers, which of the following is most likely to be a benefit of storing all user data in a database?

The developers can analyze the data to make improvements to the application based on user behavior.

Which of the following best describes the ability of parallel computing solutions to improve efficiency?

The efficiency of a solution that can be broken down into parallel portions is still limited by a sequential portion.

A student is creating a Web site that is intended to display information about a city based on a city name that a user enters in a text field. Which of the following are likely to be challenges associated with processing city names that users might provide as input?

Users might misspell the name of the city. Users might enter abbreviations for the names of cities.

A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in order for a researcher to obtain the correct result when using a binary search algorithm to determine if a given genetic code is in the list?

The list must be sorted based on the genetic code values.

Question: Which of the following data is LEAST likely to be included in the rankings of users on the leaderboard?

The location of a "Happiness Moment"

The histogram chart below has a single bar for every state in the United States. Each state is placed in a bucket, or range, based on its area in square miles. Which of the following conclusions is BEST supported by the histogram chart?

The most common size of states is between 50,000 and 100,000 square miles

A camera mounted on the dashboard of a car captures an image of the view from the driver's seat every second. Each image is stored as data. Along with each image, the camera also captures and stores the car's speed, the date and time, and the car's GPS location as metadata. Which of the following can best be determined using only the data and none of the metadata?

The number of bicycles the car passed on a particular day

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?

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

In which of the following situations is it most appropriate to use a heuristic solution?

The only algorithms that provide exact solutions run in unreasonable time but exact solutions are not necessary

Due to a computer error, the Time metadata for all of the photographs is accidentally set to the same time of day. The other pieces of metadata and the data itself are not affected by the error. Which of the following is MOST likely to be the result of this problem?

The photographer will not be able to filter to photographs taken in the morning

n the procedure Mystery below, the parameter number is a positive integer. 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.

A user unintentionally installs keylogging software on a computer. Which of the following is an example of how the keylogging software can be used by an unauthorized individual to gain access to computing resources?

The software records all user input on the computer. The recorded information is transmitted to an unauthorized individual, who analyzes it to determine the user's login passwords.

A student is developing a program that allows users to look up the definitions of words that appear in a book. The student plans to perform a large number of searches through a dictionary containing words and their definitions. The student will use a procedure written by a computer scientist to quickly search the dictionary (and knows that the procedure will return a definition if one is available). The student cannot modify the search procedure written by the computer scientist but can call the procedure by supplying a word. Which of the following is a true statement about the student's use of the computer scientist's search procedure?

The student is reusing the computer scientist's procedural abstraction by knowing what the procedure does without knowing how it does it.

Customers can pay for purchases using cash, check, a debit card, or a credit card. Using only the data collected during the 7-day period, which of the following statements is true?

The total number of items purchased on a given date can be determined by searching the data for all transactions that occurred on the given date and then adding the number of items purchased for each matching transaction.

A user purchased a new smart home device with embedded software and connected the device to a home network. The user then registered the device with the manufacturer, setting up an account using a personal e-mail and password. Which of the following explains how a phishing attack could occur against the user of the smart home device?

The user is sent an e-mail appearing to be from the manufacturer, asking the user to confirm the account password by clicking on a link in the e-mail and entering the password on the resulting page.

The list listOne is a sorted list of numbers that contains 700 elements. The list listTwo is a sorted list of numbers that contains 900 elements. Let x represent the maximum number of list elements that will need to be examined when performing a binary search for a value in listOne, and let y represent the maximum number of list elements that will need to be examined when performing a binary search for a value in listTwo. Which of the following statements about x and y is true?

The value of x is approximately equal to the value of y.

A new rechargeable battery pack is available for products that use AA batteries. Which of the following best explains how the data files in the table can be used to send a targeted e-mail to only those customers who have purchased products that use AA batteries to let them know about the new accessory?

Use the products file to generate a list of product IDs that use AA batteries, then use the list of product IDs to search the purchases file to generate a list of customer IDs, then use the list of customer IDs to search the customers file to generate a list of e-mail addresses

Which of the following best describes a privacy risk that could occur if this method of data collection is misused?

The vehicle location data could be used to monitor the movements of city residents.

Which of the following statements is true?

There exist problems that no algorithm will ever be able to solve for all possible inputs.

A team of programmers is designing software. One portion of the project presents a problem for which there is not an obvious solution. After some research, the team determines that the problem is undecidable. Which of the following best explains the consequence of the problem being undecidable?

There is no possible algorithm that can be used to solve all instances of the problem.

A team of programmers is trying to determine the efficiency of a piece of code. They run the code with inputs of different sizes and also record the number of iterations through the core block of code. The data is recorded in the table below. Input Size Iterations102002040030600408005010001002000 Based on the data provided, does this algorithm run in a reasonable or unreasonable time?

This algorithm runs in reasonable time. The relationship between the input size and the number of iterations is linear.

For which of the following goals would it be more useful to analyze the data instead of the metadata?

To determine the topics that many users are posting about

A school is conducting a survey of students to learn more about how they get to school. Students were asked how they travel to school, how long it takes them to get to school, what time they arrive at school, and for a description of their most significant challenges when traveling to school. Several rows of the data collected are shown in the table below. Which information could likely NOT be found with the data collected?

Whether students who are new to the school take longer to get to school than other students

A retailer that sells footwear maintains a single database containing records with the following information about each item for sale in the retailer's store. Using only the database, which of the following can be determined?

Which items listed in the database are not currently in the store

What will be printed to the console after this program runs?var numbers = [2, 5, 3, 1, 6] function changeNums(numList, addNum, subtractNum){ for(var i=0; i<numList.length; i++){ if(numList[i] % 3 == 0){ numList[i] = numList[i] + addNum; } else { numList[i] = numList[i] - subtractNum; } }} changeNums(numbers, 3, 2);console.log(numbers);

[0, 3, 6, -1, 9]

A/An ______ is the value passed to the parameter

argument

Pairs a public key for encryption and a private key for decryption. The sender does not need the receiver's private key to encrypt a message, but the receiver's private key is required to decrypt the message.

asymmetric encryption

Includes a program as an integral part of its function. Can be physical (e.g. self-driving car), non-physical computing software (e.g. picture editing software), or non-physical computing concepts (e.g., e-commerce).

computing innovation

A process that reverses encryption, taking a secret message and reproducing the original plain text.

decryption

Let the value of the variable x be 2, the value of the variable y be 2, and the value of the variable r be 1. Which of the following code segments can be used to draw the figure?

drawCircle(x, y, r) drawCircle(x, y + 3, r) drawCircle(x + 3, y, r) drawCircle(x + 3, y + 3, r)

Let the value of the variable xVal be 6 and the value of the variable yVal be 5. Which of the following code segments can be used to draw the figure?

drawLine(1, 5, xVal, yVal) drawline(1, 5, xVal + 2, yVal + 2) drawline(1, 5, xVal + 2, yVal - 2)

A process of encoding messages to keep them secret, so only "authorized" parties can read it.

encryption

Which function calls would provide the most helpful test of this function?Remember: With tests, you are attempting to figure out all the possible ways the function could be broken.function findMin(num1, num2){ if(num1 < num2){ return num1; } else { return num2;

findMin(-1,1)findMin(1,-1)findMin(1,1)

Here is the API for a robot library.// moves the robot forwardfunction moveForward(); // turns the robot to the leftfunction rotateLeft(); // turns the robot to the rightfunction rotateRight(); // checks if a robot can move in any direction// direction {string} - the direction to be checked// return {Boolean} - true if the robot can move in that direction, otherwise returns falsefunction canMove(direction);Which code segment will guarantee that the robot makes it to the grey square without hitting a wall or a barrier (black square)?

function solveMaze Move forward move forward rotate right while (canMove("forward")){ moveForward(); rotate left move forward

The use of a program to record every keystroke made by a computer user in order to gain fraudulent access to passwords and other confidential information.

keylogging

A/An ______ is a group of functions (procedures) that may be used in creating new programs

library

Software intended to damage a computing system or to take partial control over its operation.

malware

his function finds the minimum number in a list. What should <MISSING CODE SEGMENT> be replaced with in order for this function to operate as expected?function min(numList){ var min = numList[0]; for(var i=0; i<numList.length; i++){ if(numList[i] < min){ <MISSING CODE SEGMENT> } } return min;

min = numList[i];

Dividing a program into separate subprograms (such as libraries) is known as:

modularity

This is the subdivision of a computer program into separate subprograms.

modularity

Which call of the function correctly follows the instructions laid out in the API?

moveElement("button1", "down", 25);

Which of the following code segments will correctly create newList ?

newList ← Combine (list1, list2) newList ← Sort (newList) newList ← RemoveDuplicates (newList)

Which code segment results in "true" being returned if a number is even? Replace "MISSING CONDITION" with the correct code segment. function isEven(num){ if(MISSING CONDITION){ return true; } else { return false; }}

num % 2 == 0;

A/An ______ is a variable in a function definition and is used as a placeholder for values that will be passed through the function.

parameter

The device is positioned at the upper-left corner of a sheet of paper and is facing right. Which of the following code segments will produce the drawing shown?

penDown() goForward(10) penUp() turnRight(90) goForward(10) turnRight(90) penDown() goForward(10)

Information about an individual that identifies, links, relates, or describes them.

personally identifiable information (PII)

This provides a name for a process and allows the procedure (function) to be used only knowing what it does, and not necessarily how it does it.

procedural abstraction

Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems.

procedural abstraction

Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT:

removes procedural abstraction

Algorithms can be created in all the following ways EXCEPT:

removing sequencing, selection, and iteration from an algorithm

A/An ______ is used to return the flow of control to the point where the procedure (also known as a function) was called and to return the value of expression.

return

A wireless access point that give unauthorized access to secure networks.

rogue access point

The drawCircle procedure is to be used to draw the following figure on a coordinate grid. Which of the following code segments can be used to draw the figure? Select two answers.

x ← 4 y ← 1 r ← 0 REPEAT 3 TIMES{ r ← r + 1 y ← y + 1 drawCircle(x, y, r) } x ← 4 y ← 4 r ← 3 REPEAT 3 TIMES{ drawCircle(x, y, r) y ← y - 1 r ← r - 1

The student later decides to modify the procedure to calculate the sum of the integers from 1 to max, which represents any positive integer greater than 1. Which of the following changes should be made to the procedure to meet the student's goal? I. The procedure should take max as an input parameter.II. The condition in the REPEAT UNTIL block should be changed to count > max.III. The condition in the REPEAT UNTIL block should be changed to max < 5.

| and II


Conjuntos de estudio relacionados

Wk 1 - Practice: Ch. 3, External Analysis

View Set

CARDIO - Breath Sounds & Voice Sounds

View Set

Chapter 12: Emotional and Social Development in Adolescence

View Set

Opt Quiz 6 Micro (Market Structure)

View Set

Trade Policy and Agreements (Try it out & self-check)

View Set

Chapter 14-Nursing Management During Labor and Birth

View Set