AP COMP SCI FINAL

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.

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

a programmer wants to determine whether a score is within 10 points of a given target. For example if the target is 50

(target -10 <= score) AND (score <= target +10)

A color in computing application is represented by an RGB triplet that describes the amount of red, green, and blue

00100101, 00000000, 10000010

An office uses an application to assign work to its staff members. The application uses a binary sequence to represent each of 100 staff members. What is the minimum number of bits needed to assign a unique bit sequence to each staff member?

7

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.

A person wants to transmit an audio file from a device to a second device. Which of the following scenarios best demonstrates the use of lossless compression of the original file?

A device compresses the audio file before transmitting it to a second device. The second device restores the compressed file to its original version before playing it.

A list of binary values (0 or 1) is used to represent a black-and-white image. Which of the following is LEAST likely to be stored as metadata associated with the image.

A duplicate copy of the data.

a system is being developed to help pet owners locate lost pets. Which of the following best describes a system that uses crowdsourcing?

A mobile application that allows users to report the location of a pet that appears to be lost and upload a photo that is made available to other users of the application.

Which of the following scenarios best exemplifies a phishing attack?

A user receives an email from a sender offering technical help with the user's computer. The email prompts the user to start a help session by clicking a provided link and entering the username and password associated with the user's computer.

(PIE CHART AGAIN) Which of the following best describes the average amount of data stored per user for the first eight years of the application's existence?

Across all eight years, the average amount of data stored per user was about 10 GB

Which of the following best exemplifies the use of the multifactor 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 user's phone via text message.

The following procedure is intended to return true if at least two of the three parameters are equal in value and is intended to return false otherwise. For which of the following procedure calls does the procedure NOT return the intended value

AnyPairs("bat", "cat", "bat")

Which of the following best explains how IP addresses are assigned?

As a new device is connected to the internet, it is assigned an IP address to enable communication on the network.

A bookstore has a database containing information about each book for sale in the store. Which columns in the database can be ignored and still allow the employee to perform this calculation?

Author Title

The figure below shows two possible network configurations for devices P and C. A line between two devices indicates a connection.

Both configuration I and configuration II

Assume that the list originalList contains integer values and that the list newList is initially empty. The following code segment is intended to copy all even numbers from orginialList to newList so that the numbers in newList appear in the same relative order as in originallist.

Changing line 5 to APPEND (newList, number)

Which of the following best describes the impact of creative commons?

Creative Commons gives creators of digital content the ability to indicate how their works can be legally used and distributed, enabling broad access to digital information.

A student's overall course grade in a certain class is based on the student's scores on individual assignments. Which of the following CANNOT be determined from this data alone?

For a given student, the value of the highest assignment score.

Which of the following actions are likely to be helpful in reducing the digital divide. SELECT 2 ANSWERS

Having world governments support the construction of network infrastructure. Designing new technologies to be accessible to individuals with different physical abilities

A photographer has a collection of digital pictures... JPG. Let an original file named be stored in the string variable original. Which of the following statements will correctly extract the description and store it in the string variable DESCR?

I and II desc <--- Trimleft(TrimRight(original, 4), 11) descr <--- TrimLeft (TrimRight(original, 11), 4)

A biologist wrote a program to simulate the population of a sample of bacteria; Which of the following are true statements about the simulation?

I only (the simulation continues until either 24 hours pass or the population reaches 0)

Which of the following can be represented by a sequence of bits

I, II, III 1. An Integer 2. An alphanumeric character 3. A machine language

Consider the following algorithms. Each algorithm operate on a list containing n elements, where n is a very large integer.

I, II, and III 1. An Algorithm that accesses each element in the list twice. 2. An algorithm that accesses each element in the list n times 3. An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list.

Which of the following actions are generally helpful in program development?

I, II, and III 1. Consulting potential users of the program to identify their concerns 2. Writing and testing small code segments before adding them to the program 3. Collaborating with other individuals when developing a large program

Which of the following statements correctly explain how the internet is able to facilitate communication at a large scale?

II and III only 2. Data is routed between points in multiple ways so that if a connection fails, the data can be rerouted around the inoperative connections.3. Protocols for packets and routing are used so that computers from different manufacturers can communicate in a standard way.

Internet protocol version 6 (IPv6) has been introduced to replace the previous version (IPv4). Which of the following best describes a benefit of IPv6 over IPv4?

IPv6 addresses are shorter than IPv4 addresses, which allows for faster routing of packets.

A student wrote the following program to remove all occurrences of the strings "the" and "a" from the list wordList.

Inserting index <--- index --- 1 between lines 7 and 8

(TABLE QUESTION) A color in a computing application is represented by an RGB triplet that describes the amount of red green and blue respectively used to create the desired color.

Ivory

In mathematics a perfect number is a type of integer. The procedure IsPerfect (num) returns true if num is a perfect number and returns false otherwise. Which two lines of code should be removed so that the program will work as intended? SELECT 2 ANSWERS

Line 9 Line 5

Assume that the list of numbers nums has more than 10 elements. The program below is intended to compute and display the sum of the first 10 elements of nums.

Lines 5 and 6 should be interchanged.

Table: combine (mylist1, mylist2); RemoveallDups Which of the following can be used to assign the intended value to count?

NewList1 <--- RemoveAllDups(List1) NewList2 <--- RemoveAllDups(list2) bothlist <---Combine(newlist1, newlist2) count <--- Length(bothList) -- LENGTH (uniqueList)

A file storage application allows users to save their files on cloud servers. A group of researchers gathered user data for the first eight years of the application's existence. Which of the following observations is most consistent with the information in the circle graph?

Over 75% of the files stored are 10 MB in size or less

A programmer notices the following two procedures in a library. The procedures do similar but not identical things

Procedure Max(numlist), which returns the maximum value in the list of integers numList

An internet user has a need to send private data to another user. Which of the following provides the most security when transmitting private data.

Sending the data using public-key encription

The following algorithm is intended to determine the average height, in centimeters. of a group of people in a room. Each person has a card, a pencil and an eraser. ... Which of the following can be used as step 2 so that the algorithm works as intended.

Step 2: Each person writes their height, in centimeters at the top of the card and writes the number 1 at the bottom of the card.

The following algorithm is intended to take a positive integer as input and display its individual digits in order from right to left... Which of the following can be used as step 3 so that the algorithm works as intended?

Step 3: Display the remainder of number divided by 10 and store the integer quotient in number

Which of the following best explains the relationship between the internet and the World Wide Web

The Internet is a network of interconnected networks, and the World Wide Web is a system of linked page, programs, and files that is accessed via the internet

(PIE CHART QUESTION) Which of the following best describes the growth in the number of registered users for the first eight years of the application's existence?

The number of registered users increased at about a constant rate each year for all eight years.

Which of the following is NOT an advantage of using open-source software?

The original developer of open-source software provides free or low-cost support for users installing and running the software.

A library system contains information for each book that was borrowed. Each time a person borrows or returns a book from the library, the following information is recorded in a database. Which of the following cannot be determined from the information collected by the system?

The total number of books that were never borrowed in a given year

A group of planners are using a simulation to examine whether or not a park that they are designing is going to affect foot traffic in the area.

The updated model is likely to decrease the runtime of the simulation because the time required for simulations generally depends on the complexity of the model used.

The procedure binarysearch (numlist, target) correctly implements a binary search algorithm on the list of numbers numList. The procedure returns an index where target occurs in numList or -1 if target does not occur in numList which of the following conditions must be met in order for the procedure to work as intended?

The values in numList must be in sorted order.

Which of the following best explains why it is not possible to use computers to solve every problem?

There exist some problems that cannot be solved using any algorithm.

The transmission control protocol (TCP) and Internet protocol (IP) are used in Internet communication. Which of the following best describes the purpose of these protocols?

To establish a common standard for sending messages between devices on the internet.

The figure below shows two possible network configurations for devices P through V. A line between two devices indicates a connection.

Two

An online game collects data about each player's performance in the game. Which of the following best compares the execution times of the two versions of the program?

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

A student purchases a single-user license of a copyrighted application and wants other students to be able to use it at the same time. Under which of the following conditions is it considered acceptable for the student to share the application.

When the student gets permission from the copyright owner of the application

Which of the following can be used to store the string "jackalope" in the string variable animal? SELECT 2 ANSWERS

animal <--- Substring ("antelope", 5, 4) animal <--- Concat ("a", animal) animal <--- Concat (substring("jackrabbit", 1, 4), animal) animal <--- Substring ("antelope", 1, 4) animal <--- Concat (animal, "a") animal <--- Concat (animal, Substring("antelope", 5, 4))

(TABLE QUESTION) Ticket prices for a science museum are shown in the following table. Which of the following code segments correct displays the cost of a ticket?

cost <--- 6 if (age >12) { cost <--- cost +2 } IF (includesTour) { cost <--- cost +2 } DISPLAY (cost)

A student's overall course grade in a certain class is based on the student's scores on individual assignments.

finalgrade <--- Sum (scores) --- Min (scores) finalgrade <--- finalGrade / (LENGTH (scores) -1)


Ensembles d'études connexes

Integration Framework Exam Review

View Set

L'amour et le mariage (love and marriage)

View Set