AP Com Sci Prin final Summer
2. A cyber-attack where the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to the Internet. 1. DDos 2. Ranswomware 3. Trojan Horse 4. Bot
1
2. Which of the following is LEAST likely to indicate a phishing attach? a. An e-mail from your bank asks you to call the number on your card to verify a transaction. b. An e-mail from a merchant asks that you click on a link to reset your password. c. An e-mail from a utility company asks you to enter your date of birth and social security number for verification purposes. d. An e-mail indicates that you have won a large sum of money and asks you to enter your bank account number so that the money can be transferred to you.
A An e-mail from your bank asks you to call the number on your card to verify a transaction.
2. 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? a. How many programming statements the program contains b. How long the program takes to run c. How much memory the program requires as it runs d. How much storage space the program requires as it runs
A How many programming statements the program contains
1. Computer programs designed to infiltrate and damage computers without the users consent. This is the general term covering all the different types of threats to your computer safety such as viruses, spyware, worms, trojans, rootkits and so on. A. Malware B. Adware C. Virus D. Worm
A Malware
1. Set of rules (protocols) governing communications among all computers on the internet. a. TCP/IP b. IP c. DNS d. Algorithm
A TCP/IP
1. According to the domain name system (DNS), which of the following is a subdomain of the domain example.com? a. about.example.com b. example.co.uk c. example.com.org d. example.org
A about.example.com
2. Creation and use of technical means and their interrelation with life, society, and the enviornment, drawing upon such subjects as industrial arts, engineering, applied science, and pure science. a. technology b. invention c. innovation d. program
A technology
2. Numbers, color and characters are ___ of digital data. a. Binary numbers b. Abstractions c. Sequences d. Programs
B Abstractions
1. Which of the following best explains what happens when a new device is connected to the Internet? a. A device driver is assigned to the device. b. An Internet Protocol (IP) address is assigned to the device. c. A packet number is assigned to the device. d. A Web site is assigned to the device.
B An Internet Protocol (IP) address is assigned to the device.
1. Some programming languages use constants, which are variables that are initialized at the beginning of a program and never changed. Which of the following are good uses for a constant? I. To represent the mathematical value P (pi) as 3.14. II. To represent the current score in a game. III. To represent a known value such as the number of days in a week. a. I and II only b. I and III only c. II and III only d. I, II and III
B I and III only
2. The code segment below uses the procedure IsFound (list, item), which returns true if item appears in list and returns false otherwise. The list resultList is initially empty. (Assume the indentions are correct.) FOR EACH item IN inputList1 { If (IsFound (inputList2, item) { APPEND (resultList, item) } } Which of the following best describes the contents of resultList after the code segment is executed? a. All elements in inputList1 followed by all elements in inputList2 b. Only elements that appear in both inputList1 and inputList2 c. Only elements that appear in either inputList1 or inputList2 but not in both lists d. Only elements that appear in inputList1 but not in inputList2
B Only elements that appear in both inputList1 and inputList2
2. Which of the following is a characteristic of the fault-tolerant nature of routing on the Internet? a. The ability to use a hierarchical naming system to avoid naming conflicts. b. The ability to provide data transmission even when some connections have failed. c. The ability to resolve errors in domain name system (DNS) lookups. d. the ability to use multiple protocols such as hypertext transfer protocol (HTTP), Internet protocol (IP), and simple mail transfer protocol (SMTP) to transfer data.
B The ability to provide data transmission even when some connections have failed.
1. How can you determine the type of a variable in python? a. Print out the value and determine the data type based on the value printed. b. Use the type function. c. Use it in a known equation and print the result d. Look at the declaration not the variable.
B Use the type function.
1. Springfield Catholic High School keeps a database of information about each student, including the numeric variables numberOfAbsences and gradePointAverage. The expression below is used to determine whether a student is eligible to receive an academic award. (numberOfAbsences <= 5) AND (gradePointAverage > 3.5) Which of the following pairs of values indicates that a student is eligible to receive an academic award? a. numberOfAbsences = 3, gradePointAverage = 3.5 b. numberOfAbsences = 5, gradePointAverage = 3.8 c. numberOfAbsences = 6, gradePointAverage = 3.4 d. numberOfAbsences = 6, gradePointAverage = 3.6
B numberOfAbsences = 5, gradePointAverage = 3.8
2. Consider the following code segment, which uses the variables r, s, and t. r = 1 s = 2 t = 3 r = s s = t DISPLAY (r) DISPLAY(s) What is displayed as a result of running the code segment? a. 1 1 b. 1 2 c. 2 3 d. 3 2
C 2 3
2. 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. A credit card company analyzing credit card purchases to identify potential fraudulent charges. b. A grocery store analyzing customers' past purchases to suggest new products the customer may be interested in. c. A high school analyzing student grades to identify the students with the top ten highest grade point averages. d. An online retailer analyzing customers' viewing habits to suggest other products based on the purchasing history of other customers.
C A high school analyzing student grades to identify the students with the top ten highest grade point averages.
1. 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 compute simulations.
C Computer simulations usually make some simplifying assumptions about the real-world object or system being modeled.
1. Biologists often attach tracking collars to wild animals. For each animal, the following geolocation data is collected at frequent intervals. 1. The time 2. The date 3. The location of the animal Which of the following questions about a particular animal count NOT be answered using only the data collected from the tracking collars? a. Approximately how many miles did the animal travel in one week. b. Does the animal travel in groups with other tracked animals. c. Do the movement patterns of the animal vary according to the weather. d. In what geographic locations does the animal typically travel?
C Do the movement patterns of the animal vary according to the weather.
1. A programmer completes the user manual for a video game she has developed and realizes she has reversed the roles of goats and sheep throughout the text. Consider the programmer's goal of changing all occurrences of "goats" to "sheep" and all occurrences of "sheep" to "goats." The programmer will use the fact that the word "foxes" does not appear anywhere in the original text. Which of the following algorithms can be used to accomplish the programmer's goal? a. First, change all occurrences of "goats" to sheep". Then, change all occurrences of "sheep" to goats". b. First, change all occurrences of "goats" to sheep". Then, change all occurrences of "sheep" to "goats". Then, change all occurrences of "foxes" to "sheep". c. First, change all occurrences of "goats" to foxes". Then, change all occurrences of "sheep" to "goats". Then, change all occurrences of "foxes" to sheep". d. First, change all occurrences of "goats" to foxes". Then, change all occurrences of "foxes" to "sheep". Then, change all occurrences of "sheep" to goats".
C First, change all occurrences of "goats" to foxes". Then, change all occurrences of "sheep" to "goats". Then, change all occurrences of "foxes" to sheep".
2. Which of the following is considered an unethical use of computer resources? a. Downloading freeware or shareware onto your home computer. b. Purchasing a game from an app store and downloading it directly to a mobile device. c. Purchasing a single-user copy of photo editing software and installing it on all the computers in a computer lab. d. Searching online for an electronic version of a school textbook.
C Purchasing a single-user copy of photo editing software and installing it on all the computers in a computer lab.
Which of the following activities poses the greatest personal cybersecurity risk and justify your answer a. Making a purchase at an online store that uses public key encryption to transmit credit card information. b. Paying a bill using a secure electronic payment system. c. Reserving a hotel room by e-mailing a credit card number to a hotel. d. Withdrawing money from a bank account using an automated teller machine (ATM)
C Reserving a hotel room by e-mailing a credit card number to a hotel.
1. A certain social media Web Site allows users to post messages and to comment on other messages that have been posted. When a user posts a message, the message itself is considered data. In addition to the data, the site stores the following metadata. 1. The time the message was posted 2. The name of the user who posted the message 3. The names of any users who comment on the message and the times the comments were made For which of the following goals would it be more useful to analyze the data instead of the metadata? a. To determine the users who post messages most frequently b. To determine the time of day that the site is most active c. To determine the topics that many users are posting about d. To determine which posts from a particular user have received the greatest number of comments
C To determine the topics that many users are posting about
2. Which of the following is a true statement about program documentation? a. Program documentation should not be changed after it is first written. b. Program documentation is only needed for programs in development; it is not needed after a program is completed. c. Program documentation is useful when programmers collaborate but not when a programmer works individually on a project. d. Program documentation is useful during initial program development and also when modifications are made to existing programs.
D Program documentation is useful during initial program development and also when modifications are made to existing programs.
2. A new bank plans to make customer convenience a priority by minimizing the amount of time a customer waits in line. The bank is considering two options: a single line where the customer at the front waits for the next available teller, or separate lines for each teller. The bank decides to use a computer simulation of these two options to determine the average wait time for customers. Which of the following is NOT true about the bank's plan? a. The bank can incorporate other factors, such as the number of tellers, in the simulation. b. The bank can use the simulation to investigate these two options without causing inconvenience for customers. c. The bank may consider new alternatives based on the simulation results. d. The simulation will not produce usable results because actual customer data are not available.
D The simulation will not produce usable results because actual customer data are not available.
1. The algorithm below is used to simulate the results of flipping a coin 4 times. Consider the goal of determining whether the simulation resulted in an equal number of heads and tails. Step 1: Initialize the variables heads_counter and flip_counter to 0. Step 2: A variable coin_flip is randomly assigned a value of either 0 or 1. if coin_flip has the vale 0, the coin flip result is heads, so heads_counter is incremented by 1. Step 3: Increment the value of flip_counter by 1. Step 4: Repeat steps 2 and 3 until flip_counter equals 4. Following the execution of the algorithm, which of the following expressions indicates that the simulation resulted in an equal number of heads and tails? a. count_flip = 1 b. flip_counter = 1 c. flip_counter = 2 d. heads_counter = 2
D heads_counter = 2