AP COMP SCIENCE FINAL PRACTICE

Ace your homework & exams now with Quizwiz!

p -> 10 q -> 20 r -> 30 s -> 40 p -> q q -> r s -> q r -> p

20

A user wants to save a data file on an online storage site. The user wants to reduce the size of the file, if possible, and wants to be able to completely restore the file to its original version. Which of the following actions best supports the user's needs?

Compressing the file using a lossless compression algorithm before uploading it

A teacher is writing a code segment that will use variables to represent a student's name and whether or not the student is currently absent. Which of the following variables are most appropriate for the code segment?

A string variable named studentName and a Boolean variable named isAbsent

In the following procedure, the parameters x and y are integers. Which of the following is the most appropriate documentation to appear with the calculate procedure?

Displays the value of (x + y) / x.The value of the parameter x must not be 0.

Which of the following is a benefit of using a list as a data abstraction in a program?

Lists often allow their size to be easily updated to hold as many data values as needed.

first -> true second -> false second -> first first -> second

The value of first is true, and the value of second is true.

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 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 is an advantage of a lossless compression algorithm over a lossy compression algorithm?

A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.

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.

A database of information about shows at a concert venue contains the following information. Name of artist performing at the show Date of show Total dollar amount of all tickets sold 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

The variable isOpen is to be used to indicate whether or not a store is currently open. Which of the following is the most appropriate data type for isOpen ?

Boolean

A company that develops educational software wants to assemble a collaborative team of developers from a variety of professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team?

Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing.

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.

Three students in different locations are collaborating on the development of an application. Which of the following strategies is LEAST likely to facilitate collaboration among the students?

Having all three students write code independently and then having one student combine the code into a program

A teacher sends students an anonymous survey in order to learn more about the students' work habits. The survey contains the following questions. On average, how long does homework take you each night (in minutes) ? On average, how long do you study for each test (in minutes) ? Do you enjoy the subject material of this class (yes or no) ? Which of the following questions about the students who responded to the survey can the teacher answer by analyzing the survey results? Do students who enjoy the subject material tend to spend more time on homework each night than the other students do? Do students who spend more time on homework each night tend to spend less time studying for tests than the other students do? 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

A programmer is developing software for a social media platform. The programmer is planning to use compression when users send attachments to other users. Which of the following is a true statement about the use of compression?

Lossy compression of an image file generally provides a greater reduction in transmission time than lossless compression does.

In the following procedure, the parameter max is a positive integer. PROCEDURE printNums(max) { count ←← 1 REPEAT UNTIL(count > max) { DISPLAY(count) count ←← count + 2 } } Which of the following is the most appropriate documentation to appear with the printNums procedure?

Prints all positive odd integers that are less than or equal to max.

In the following procedure, the parameter numList is a list of numbers and the parameters j and k are integers. PROCEDURE swapListElements(numList, j, k) { newList ←← numList newList[j] ←← numList[k] newList[k] ←← numList[j] RETURN(newList) } Which of the following is the most appropriate documentation to appear with the swapListElements procedure?

Returns a copy of numList with the elements at indices j and k interchanged.The values of j and k must both be between 1 and LENGTH(numList), inclusive.

A researcher is analyzing data about students in a school district to determine whether there is a relationship between grade point average and number of absences. The researcher plans on compiling data from several sources to create a record for each student. The researcher has access to a database with the following information about each student. Last name First name Grade level (9, 10, 11, or 12) Grade point average (on a 0.0 to 4.0 scale) The researcher also has access to another database with the following information about each student. First name Last name Number of absences from school Number of late arrivals to school Upon compiling the data, the researcher identifies a problem due to the fact that neither data source uses a unique ID number for each student. Which of the following best describes the problem caused by the lack of unique ID numbers?

Students who have the same name may be confused with each other.

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 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 city's police department has installed cameras throughout city streets. The cameras capture and store license plate data from cars driven and parked throughout the city. The authorities use recorded license plate data to identify stolen cars and to enforce parking regulations. 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.

A company that develops mobile applications wants to involve users in the software development process. Which of the following best explains the benefit in having users participate?

Users can provide feedback that can be used to incorporate a variety of perspectives into the software.

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

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

StreamPal is an audio-streaming application for mobile devices that allows users to listen to streaming music and connect with other users who have similar taste in music. After downloading the application, each user creates a username, personal profile, and contact list of friends who also use the application. The application uses the device's GPS unit to track a user's location. Each time a user listens to a song, the user can give it a rating from 0 to 5 stars. The user can access the following features for each song that the user has rated. A list of users on the contact list who have given the song the same rating, with links to those users' profiles A map showing all other users in the area who have given the song the same rating, with links to those users' profiles A basic StreamPal account is free, but it displays advertisements that are based on data collected by the application. For example, if a user listens to a particular artist, the application may display an advertisement for concert tickets the next time the artist comes to the user's city. Users have the ability to pay a monthly fee for a premium account, which removes advertisements from the application. 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.

The variable age is to be used to represent a person's age, in years. Which of the following is the most appropriate data type for age ?

number

Consider the following code segment. x ←← 25 y ←← 50 z ←← 75 x ←← y y ←← z z ←← x Which of the variables have the value 50 after executing the code segment?

x and z only


Related study sets

COB 300 Operations Test 2 Review (Yuyun Zhong)

View Set

Completing the Application, Underwriting, and Delivering the Policy

View Set

Nurs 4 - Mod 13: Pediatric Heart Defects

View Set

Unit 3A - Comparatives and superlatives

View Set

AP US History: Period 1 (1491 - 1607)

View Set

Microeconomics Chapters 7-11 (Midterm #2)

View Set

Info Assurance Chapter 7-11 Questions

View Set