CSP Practice AP Exam

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A named space that can hold a value is which of the following? a. Variable b. Turtle c. String d. Program

A

A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attending the morning session, and the list afternoonList contains the names of all children attending the afternoon session. Only children who attend both sessions eat lunch at the camp. The camp director wants to create lunchList, which will contain the names of children attending both sessions. The following code segment is intended to create lunchList, which is initially empty. It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise. FOR EACH child IN morningList { <MISSING CODE> } Which of the following could replace <MISSING CODE> so that the code segment works as intended? (A) IF (IsFound (afternoonList, child)) { APPEND (lunchList, child) } (B) IF (IsFound (lunchList, child)) { APPEND (afternoonList, child) } (C) IF (IsFound (morningList, child)) { APPEND (lunchList, child) } (D) IF ((IsFound (morningList, child)) OR (IsFound (afternoonList, child))) { APPEND (lunchList, child) }

A

Numbers can be represented in multiple bases. For example in the octal system we can represent 8 digits, numbers are expressed in octal with a subscript 8. What is the octal representation of the decimal number 25? a. 31 b. 14 c. 30 d. 160

A

Vim can be represented: Hexadecimal: 76 69 6D Decimal: 118 105 109 Binary: 01110110 01101001 01101101 Why do computer scientists often prefer hexadecimal a)hexadecimal uses fewer digits than binary b)hexadecimal representations uses letters as well as numbers c)computers, at their most basic, use hexadecimal, not decimal or binary d)early typesetting procedures that predate modern computing used a base-16 system to represent alpha-numeric characters

A

What will be the value of var3 after the following code executes? var 1 = "cat", var2 = "dog", var3 = "bird",var1 = var2, var3 = var1,var2 = "fish" a. Dog b. Fish c. cat d. Bird

A

Which of the following are true statements about digital certificates in Web browsers? I. Digital certificates are used to verify the ownership of encrypted keys used in secured communication. II. Digital certificates are used to verify that the connection to a Web site is fault tolerant. (A) I only (B) II only (C) I and II (D) Neither I nor II

A

Which of the following is FALSE about event-driven programs? a. Event driven programs do not implement algorithms b. Some portions of an event driven program may never execute while the program is running c. An event driven program is written to respond to specified events by executing a block of code or function associated with the event d. The order in which an event driven program will run cannot always be known ahead of time e. Event driven programs can be run multiple times with different outcomes, based on user interactions.

A

If I understand how the Internet works then I will be able to : (two correct responses) a. Make informed choices to support or oppose decisions my government makes about access to the Internet b. Connect the latest devices to the Internet c. Make informed choices about my privacy on the internet d. Get the best price for my cell phone plan e. Speed up my downloads of movies I purchase.

A and C

Which of the following are desired properties of procedural abstraction? Select two answers A) minimally specified B) trivial C) simple D) specific

A and C

High level computer programming languages such as python, C++ and Java provide which of the following features? select two answers A) Constants, expressions, and libraries B) few or no abstractions C) conversion to machine code without a complier D)statements and procedures

A and D

Which of the following can be represented by a single binary digit? Two Answers: a) any integer modulus 2 b) the temperature outside c) the score on a math test d) if a grade is passing or failing

A and D

A binary message consisting of four bits was sent to you by a friend. The message was supposed to be ABAB. Unfortunately your friend sent the bit on the wire once every 2 seconds, but you read the wire once every second. Assuming that the first bit was sent and read at the same time, what message did you receive instead? a. ABAB b. AABB c. AAAA d. BBBB e. ABBB

B

ASCII is an acronym for a. American Standard Cryptography Information Instruction b. American Standard Code for Information Interchange c. American Standard Cipher for Information Instruction d. None of the above

B

According to the Domain Name System (DNS) which of the following is a subdomain of the domain www.code.org a. code.org/ s/course 1 b. Studio.code.org c. code.org/subdomain/forum d. Code.org

B

An online gaming website has a list of users that has been sorted alphabetically by last name. In order to find a certain user, a binary search is performed. As many new members are added to the database, will the number of steps the algorithm will take to solve the problem most likely also increase. Why or Why not? a. Yes, the number of steps in an algorithm changes proportional to the size of the input. b. Yes, because the new members may not be added alphabetically c. Np, the program is written already, and will take the same number of steps regardless of the size of the database. d. No, because the search is binary, so the dataset is split in half with every iteration.

B

One of the interesting job descriptions has the following text; "Accessing data and computing power without being granted access but with the permission of the system administrators.... Their job is to identify and repair system vulnerabilities." Which of the following jobs is being described here? a. Hacking b. Penetration testing c. Privilege escalation d. Black hatting

B

There are 32 students standing in a classroom. Two different algorithms are given for finding the average height of the students. Algorithm A Step 1: All students stand. Step 2: A randomly selected student writes his or her height on a card and is seated. Step 3: A randomly selected standing student adds his or her height to the value on the card, records the new value on the card, and is seated. The previous value on the card is erased. Step 4: Repeat step 3 until no students remain standing. Step 5: The sum on the card is divided by 32. The result is given to the teacher. Algorithm B Step 1: All students stand. Step 2: Each student is given a card. Each student writes his or her height on the card. Step 3: Standing students form random pairs at the same time. Each pair adds the numbers written on their cards and writes the result on one student's card; the other student is seated. The previous value on the card is erased. Step 4: Repeat step 3 until one student remains standing. Step 5: The sum on the last student's card is divided by 32. The result is given to the teacher. Which of the following statements is true? (A) Algorithm A always calculates the correct average, but Algorithm B does not. (B) Algorithm B always calculates the correct average, but Algorithm A does not. (C) Both Algorithm A and Algorithm B always calculate the correct average. (D) Neither Algorithm A nor Algorithm B calculates the correct average.

B

Two classmates working on a project together don't want any of their classmates to be able to read their work, so they decide to use Caesar's Cipher where the letters are shifted left or right to encrypt their work. Caesar's Cipher is an example of which kind of encryption? a. Private key encryption b. Symmetric encryption c. Public key encryption d. Asymmetric encryption

B

What is an RFC? a. Restricted Fiduciary Contract b. Request for Comments c. Radio Frequency Controller d. Related Fundamental Content e. ReFactored Code

B

Which of the following BEST describes how protocols on the Internet (eg IP, TCP, HTTP) make use of abstraction to accomplish their respective purposes? a. High level protocols take into account specific implementation details of lower level protocols to ensure they are compatible b. Low level protocols can provide functionality to high level protocols without revealing the details of how this is accomplished c. Low level protocols are written in binary while high level protocols are written in hexadecimal d. High level protocols can take on the role of a low level protocol in the event of a failure in the system

B

Which of the following layers is the first layer of the OSI? a) the data-link layer b) the physical layer c) the network layer d) the transport layer

B

App Inventor is an example of which of the following (choose all that apply) a. A cloud application b. An integrated development environment (IDE) c. A software system for developing mobile apps that may be run on Android, iOS, and other mobile platforms d. A programming language

B and C

Which of the following statements are true of procedures? Select two answers A) procedures must return a value (a number, text, boolean etc.) B) updating code is easier if procedures are used for repeated parts of the program C) A procedure must be called more than once in order to be useful D) procedures make programs less complex by reducing identical code

B and D; For choice B, imagine having to change the same line of code at 20 different spots in your program. For choice D, the procedure makes the program less complex because you're replacing all the repeated code with a call to a procedure

"There are 10 types of people in this world: those who understand binary and those who don't" Why might computer scientists find this statement humorous? a) There are ten types of computer programmers in the world b) 10 (binary) = 2 (decimal) c) 10 (decimal) = 1010 (binary) d) 10 (hexadecimal) = 16(decimal) = 1 0000 (binary)

B; the number 10 in binary is 2 thus the two types of people are those who understand binary and those who don't

A programmer has a choice between a higher level and lower level programming language to use. Which should she choose and why? a. The higher level language, because the language itself will be less complex, and there will be fewer errors b. The lower level language, because it offers more flexibility for complex programs c. It depends on her needs, as a high level language will be less complex, but will not allow as much freedom as a lower level language d. Either language, because both languages will be converted to a lower level language to be executed on the computer.

C

A video streaming website uses 32 bit integers to count the number of times each video is played. In anticipation of some videos being played more times than can be represented with 32 bits, the Web site is planning to change to 64 bit integers for the counter. Which of the following best describes the result of using 64 bit integers instead of 32 bit integers? a. 2 times as many values can be represented b. 32 times as many values can be represented c. 2^32 times as many values can be represented d. 32^2 times as many values can be represented

C

If you had two different shapes ( a circle and a square) how many 3 place patterns can you make? a. 4 b. 6 c. 8 d. 10 e. 12

C

In many programming environments today, one language translate the programmers code into different languages before the computer actually executes the code. For instance, the visual programming language Alice translate your instructions into python, then python translates the code into machine readable code. Python in the situation also relies on some C/C++ libraries for certain items, including collision detection. In this situation what is the highest level language being used? A) C/C++ B) Python C) Alice D) Machine Code

C

In which way does y increase on an image? a. From left to right b. From right to left c. From top to bottom d. From bottom to top

C

The Internet Engineering Task Force (IETF) defines the protocols and standards for how the Internet works. The members of the IETF are: a. An international coalition of government agencies who oversee the Internet in their countries b. The worldwide leaders of the Tier 1 internet service providers c. A loosely organized collection of citizens and engineers who communicate mostly by email d. Political leaders and heads of state e. There are no members. IETF is an "organization" in name only

C

There are multiple levels of abstraction in computer hardware. Which of the following is not a level of abstraction in computer hardware? A) Transistors B) memory C) operating systems D) motherboards

C

Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem? (A) When the problem can be solved in a reasonable time and an approximate solution is acceptable (B) When the problem can be solved in a reasonable time and an exact solution is needed (C) When the problem cannot be solved in a reasonable time and an approximate solution is acceptable (D) When the problem cannot be solved in a reasonable time and an exact solution is needed

C

What is NOT the difference between IP address and IP packet? a. IP addresses are 32 bits, typically written as 4 dotted quads; an IP packet is a message of data that includes information to route the message from the source to the destination computer b. IPv4 doesn't provide enough addresses, so IPv6 uses 128 bit addresses c. An IP packet contains an IP addresses AND the data is intended for the machine identified by the IP address. d. An IP address is a sequence of numbers used to identify a device on the IP network. An IP packet is a datagram.

C

Which of the following is NOT a reason computers use hexadecimal? a)hexadecimal is a natural progression from binary b)hexadecimal is convenient and brief c)hexadecimal shows no relation to binary d)hexadecimal is an easy way to express word size

C

Which of the following statements describes a limitation of using a computer simulation to model a real-world object or system? (A) Computer simulations can only be built after the real-world object or system has been created. (B) Computer simulations only run on very powerful computers that are not available to the general public. (C) Computer simulations usually make some simplifying assumptions about the real-world object or system being modeled. (D) It is difficult to change input parameters or conditions when using computer simulations

C

Which of the following statements are true about routers and routing on the Internet. Choose two answers. a. Protocols ensure that a single path between two computers is established before sending packets over it. b. Routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. A packet traveling between two computers on the Internet may be rerouted many times along the way or even lost or "dropped". d. Routers act independently and route packets as they see fit

C and D

Which of the following does not describe the process of procedural abstraction? A) a named sequence of instructions that has specific and limited function B) A mental model of what we want to program to do C) The reduction of a particular body of data to a more simplified model of the whole D) in concept, each method should either have its behaviors encapsulated internally to a specific object or be widely usable

C; Reducing a particular body of data to a more simplified model is the definition of data abstraction not procedural abstraction

Which of the following BEST describes the number of values we can express using a 64-bit system instead of 32-bit system? a) 2 times as many values can be represented b) 32 times as many values can be represented c) 2^32 times as many values can be represented d) 32^2 times as many values can be represented

C; increase place values by 32

Which of the following values DOES NOT represent the same number, written in different number system notations? a) decimal: 17 b) roman numeral: XVII c) Hexadecimal: 16 d) Binary: 0001 0001

C; does not represent 17 like the rest

A binary question is defined as a. A piece of information that is sent in pairs b. Two questions which share the same answer c. A message which has two possible states d. A question which can be answered in only one of the two possible ways

D

A standard QWERTY keyboard has 47 characters that can place characters on the screen. Each of these keys can also display a second character by holding the "Shift" key at the same time. How many bits would you need to encode everything that could be typed on this keyboard? a. 3 bits b. 4 bits c. 5 bits d. 7 bits e. 12 bits

D

A user clicks on a website, and it begins to load immediately, but it take a long time for the pictures to load completely and pictures appear slowly, one by one. Which of the following is demonstrated by this situation? a. High bandwidth, high latency b. Low bandwidth, high latency c. High bandwidth, low latency d. Low bandwidth, low latency

D

ASCII has an encoding for every character of the alphabet as well as encodings for numbers-- that is encodings for the symbols of the digits 0 - 9. How many bits are required to store the text of the number "200" in ASCII? a. 3 bits b. 8 bits c. 16 bits d. 24 bits e. 32 bits

D

In digital devices, numbers are represented by two voltage levels or states. Each number or digit in the binary number system is called a bit. All digital data is represented by bits at the lowest level of abstraction. Which of the following is not a physical component of a computing system that has two states? A) transistors B) magnets C) switches D) chips

D

The Internet is composed of many layers. Higher level layers depend on the functionality of the lower levels without worrying about precisely how those layers work. These layers in order from lower to higher are: a. Physical network, IP, TCP b. IP, Physical network, TCP c. TCP, IP, Physical network d. Physical Network, TCP, IP

D

The advent of technology has increased the opportunity for many people to access the Internet. With this growth comes the need for increase in network's capacity for large amount of data travel. Which of the following terms defines this measurement? a. Baud rate b. Broadband c. Latency d. Bandwidth

D

What base could the number 23 be in I octal(base 8) II decimal (base 10) III hexadecimal ( base 16) a. I and II only b. I and III only c. II and III d. I, II, and III

D

What is the minimum number of bits you will need to encode the 26 letters of the alphabet plus a space? a. 2 bits b. 3 bits c. 4 bits d. 5 bits e. 6 bits

D

What will be the result of 18 % 5? a. 0 b. 1 c. 2 d. 3

D

When sending a response to a question with four possible answers, the most efficient method will require no more than how many bits? a. 5 bits b. 4 bits c. 3 bits d. 2 bits e. 1 bit

D

Which of the following is a true statement about data compression? (A) Data compression is only useful for files being transmitted over the Internet. (B) Regardless of the compression technique used, once a data file is compressed, it cannot be restored to its original state. (C) Sending a compressed version of a file ensures that the contents of the file cannot be intercepted by an unauthorized user. (D) There are trade-offs involved in choosing a compression technique for storing and transmitting data.

D

Which of the following number systems uses the symbols A through F? a) binary b) octal c) decimal d) hexadecimal

D

Why is digital data represented in binary in computers? a. The binary number system is the only system flexible enough to allow for representing data other than numbers b. As a consequence of history; early pioneers of computing were making secret codes in binary, and this simply evolved into modern computing. c. It's impossible to build a computing machine that uses anything but binary to represent numbers d. It's easier, cheaper, and more reliable to build machines and devices that only have to distinguish between binary states

D

Which of the following statements is not true about high-level and low-level programming languages? A) high level language must be translated into low level language before computers can understand it B) it is easier to debug a program written in high-level languages than one written in the lower level program language C) Low level languages provide fewer abstractions than high-level languages D) programs written in a high-level language are generally more difficult for programmers to understand than programs written in the lower level language

D; High level language was created so that programmers could write code in a language that was easier to understand however computers cannot understand high-level language so it must be translated with a complier and interpreter

In digital devices, numbers are represented by two voltage levels or states. Each number or digit in the binary number system is called a bit. All digital data is represented by bits at the lowest level of abstraction. Which of the following is NOT a physical component of computing a system that has two states? A)transistors b)magnets c)switches d)chips

D; computer chips such as CPU and RAM chips have multiple groups of bit components and therefore multiple states

0110 1011 0010 1011 This sequence represents: a) a number b) data c) instructions for the computer d) something that depends on the context in which it is used

D; the interpretation of a binary sequence is dependent on context-- this could be a number, data (numeric or otherwise), or instructions for the computer. It is not possible to tell the meaning of a string of zeros and ones without knowing its context.

When working with Python, Clinton subtracted 0.1 from 0.3 but he did not see the result 0.2 that he expected. Instead, he saw 0.3-0.1 = 0.1999999999998 This is because

a) an overheated processor making small errors b) a fixed number of bits representing floating point values, leading to small errors c) a bug in the Phython language d) the inevitability of computers taking over and making complex decisions on their own

Which of the following elements would be considered part of the user interface(UI) for an app? Choose all that apply a. A button that appears on the screen b. An audible click that happens when the user taps the button c. An error message that appears when something goes wrong d. The app's memory usage e. The color of the app's background screen

a,b,c

The World Wide Web (WWW) __________ (choose all that applies) a. Is a system of interlinked hypertext documents b. Uses the HTTP protocol c. Is maintained by Google and Facebook d. Was invented by Tim Berners-Lee

a,b,d

Which of the following are advantages of cloud computing? Choose all that applies a. Cloud computing relieves users from having to backup their own data and information b. Cloud computing makes it easier to share information c. Information is stored on each user's computer d. Users can access information that is on the cloud from anywhere that has an Internet Connection.

a,b,d

The Internet ____________________(choose all that applies) a. Is a network of networks b. Was invented by Tim Berners-Lee c. Connects devices and computers around the world d. Is based on the Internet protocol suite

a,c,d

Which of the following is an example of a cloud computing application? Choose all that applies a. Twitter b. Excel c. Gmail d. PowerPoint e. Facebook f. DropBox

a,c,e,f

Which of the following would be considered an event on your smartphone? Choose all that apply a. The user taps on the screen b. The phone receives a text message c. The phone;s location changes d. The app plays a sound clip e. The phone's internal clock ticks

a,d,e

Which of the following algorithms require both selection and iteration? Select two answers. (A) An algorithm that, given two integers, displays the greater of the two integers (B) An algorithm that, given a list of integers, displays the number of even integers in the list (C) An algorithm that, given a list of integers, displays only the negative integers in the list (D) An algorithm that, given a list of integers, displays the sum of the integers in the list

b,c

Which of the following are actions that a programmer could take when debugging a segment of code that would most likely lead to finding a problem and fixing it? (choose two) a. Change the names of the variables within the program and run the program again b. Display the value of variables at various points during the program c. Ask a friend or collaborator to look over the code segment to see if they are able to find any errors d. Delete the code and retype it to make sure that there are not spelling error and that it was written correctly

b,c

An overflow error occurs when there aren't enough bits to represent a given number. Which of the following would cause an overflow error to occur (choose all that apply) a. Trying to represent 15 in 4 bits b. Trying to represent 16 in 4 bits c. Trying to represent 31 in 5 bits d. Trying to represent 32 in 5 bits

b,d

Analytics is the computational analysis of data. There are many types of analytics that people can use to properly process large data sets. Which of the following analytics type is defined incorrectly? a. Operationalized - analytics becomes a part of the business process b. Basic - analytics used for data manipulation, simple visualizations, and monitoring c. Monetized - analytics that require fees to be paid in order to access and process the data d. Advanced - analytics used for predictive modeling and pattern matching

c

Which of the following lists arranges hardware components from the lowest to the highest a. Ram chip, motherboard, logic gate, physical circuit b. Physical circuit, motherboard, logic gate, ram chip c. Physical circuit, logic gate, ram chip, motherboard d. Ram chip, logic gate, physical circuit, motherboard

c

Which of the following could NOT be represented by the sequence 0100 0001? a) a b) 65 c) 1011 1110 d) amount of red in RGB model

c; the sequence cannot represent the binary numeral since they are two different binary numbers

Which of the following is not an advantage of using simulation to solve a problem? a. The best solution can be found quickly b. The simulation may save money compared to constructing a physical system c. The simulation may save time compared to constructing a physical system d. The simulation may create new questions

d


Set pelajaran terkait

CSIT 128 - Introduction To Web Technology

View Set

GEOG 1001, exam 1, LSU Richardson

View Set

Chapter 1, 2, 4 Financial Policies

View Set

Ch 6 Troubleshooting Windows Startup

View Set

Introduction to Mastering Biology

View Set