APCSP final exam review 18

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following Boolen expressions is not equivalent to the expression num*-1>=10

(num<0) AND (num*-1 = 10)

Karel the dog is instructed to move forward one space. Then, if Karel is standing on a ball, Karel will turn right. Otherwise, Karel will move forward two spaces. Given the starting point below, where will Karel end up?

*the answer is a picture* The dog is facing down, to the left of the ball

What is the result of running this program code? var sum=0; for(var i=4; i> 0;i--){ sum+=i; } println(sum)

10

Which binary value is equal to the decimal number 12base10?

1100 base2

How many different digits are used in the Hexadecimal number system?

16

How many different values can be represented using 4 bits?

16 different values

An online store uses 8-bit binary values to identify each unique item for sale. The store plans to increase number of items it sells and is considering changing to a 9-bit binary values. Which of the following best describes the result of using 9-bit values instead of 8-bit values?

2 times as many items can be uniquely identified.

How many more characters can you represent in your new programming language?

2 to the 8 times as many characters

Which of the following best describes the result of using 64-bit integers instead of 32-bit integers?

2 to the power of 32 times as many values can be represented

Which of the following expressions is equivalent to the value returned from Mystery(x)

2*3*x

Suppose the ESPN website uses 8-bit unsigned integers to store how many points a team has scored in a NBA game.

255(base 10)

Which of the following best describes the result of using 128-bit addresses instead of 32-bit addresses?

2^96 times as many addresses can be represented

What is the minimum number of connections that must be broken or removed in the network before computer E can no longer communicate with computer F

3

What is the value of Mystery("Karel",["karel", "karel", "tracy", "karel",

3

What is the minimum number of bits you would need to represent a number on a 0 to 10 scale

4

What does this flowchart algorithm display?

?

Which of the following statements describes a limitation of using a heuristic approach to solve a problem?

A heuristic approach can only provide an approximate solution, rather than an exact solution

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

A program that computes the best move to play in a board game

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

An email from your bank asks you to call the number on your card to verify a transaction

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

An online retail store analyzing customers' viewing habits to suggest other products based on the purchasing history of other customers.

A video viewing Website previously used 32-bit integers to store the number of views for each video, but a video that had been watched billions of times hit the maximum value. What is it called when this maximum is exceeded?

An overflow error

A researcher is emailing images of soil samples back to her lab so her team can analyza them. She notices that the images sent in her email are of low quality than the images on her camera. Which of the following could be a possible explanation for the difference in image quality?

Before being sent, the image was compressed using a lossy compression technique.

Which number system is used to store information digitally in a computer?

Binary (base2)

Assume we have an algorithm used to simulate the results of flipping a coin n times........

Both Algorithm A and Algorithm B always calculate the correct answer.

In this code, how many times is the dance function called and how many times is it defined?

Called 3 times, defined 1 time

What change do you need to make to be able to display the correct maximum value for any list of integers?

Change line 1 to max<---- list[1]

Which of the following will NOT affect the results when the code segment is executed?

Change line 3 to x<-----y

Which of the following statements are true about using a high-level programming language instead of a lower-level language?

Code in a high-level language is often translated into code in a lower-level language to be executed on a computer

Which of the following lists the numbers in order from least to greatest?

Decimal 70, Binary 1001001, Hexadecimal 4E

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

Digital certificates are used to verify the ownership of encrypted keys used in secure communication.

What is displayed as a result of running this program?

Dog Turtle.

Which of the following activities poses the greatest personal cyber security risk?

Emailing your bank account number to an online vendor to purchase a product from them.

Which of the following is a true statement about these algorithms?

Generally, as the size of songList becomes larger, Algorithm 2 will be more efficient than Algorithm 1

Given the following algorithms, which one uses selection?

Given two numbers display the larger of the two

Which of the following are true statements about Distributed Denial of Service (DDoS) attacks?

I- DDoS attacks compromise a target website by flooding it with requests from multiple systems II- DDoS attacks are carried out using a large group of computers

Which of the following statements are true about this network

I- The network is fault tolerant. If a single connection fails, any two devices can still communicate. II- Computers B and F need to first communicate with at least one other devices in order to communicate with each other.

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

I-Estimate the number of texts that will be sent next month III-Determine if two phones have been in contact in the last week

Which of the following statements are true about the internet?

II III IV

Which of the following statements are true?

III- There exist problems that cannot be solved by any algorithm for all inputs.

Which of the following questions could NOT be answered using only the data and metadata collected?

In what country is the site most active?

Biologists are researching the migration patterns of birds. For each bird. the following geolocation data is collected at frequent intervals. -The time -The date -The location of the bird Which of the following questions about the group of tracked birds could be answered using only the data collected from the tracking collars?

In what month do the birds tend to travel the farthest?

Which of the procedures below is the correct implementation of the JUMP_HURDLE procedure used in the above program?

PROCEDURE JumpHurdle() { move_forward() rotate_left() move_forward() move_forward() rotate_left() move_forward() }

which of the following are true statements about phishing attacks?

Phishing attacks are characterized by communication from one person trying to trick another person into divulging personal information

Procedures A and B are meant to get the minimum value of a list of one or more integers. We have two procedures below.

Procedure A returns the correct minimum value, but Procedure B does not.

Why is it important to focus on programming style in addition to programming functionality?

Program style helps others understand your program and maintain it. Programming style increases the re-usability of your code.

A city government is attempting to reduce the digital divide between groups with differing access to computer and the internet. Which of the following actions is MOST likely to be effective in this purpose?

Providing free wireless Internet connections at locations in low-income neighborhoods.

Which of the following activities poses the greatest personal cyber security risk?

Purchasing a couch by emailing a credit card number to the couch owner.

Which of the following actions is LEAST likely to be effective in this purpose?

Putting helpful tips for operating computers on the city government website.

What ASCII character is represented by the binary (base2) number 1010001?

Q

You are writing a program to simulate a coin toss. What line of code could be used to replace so that there is a 50-50 chances of your program printing heads or tails?

RANDOM(1,2)=1

Consider the example grid above. Assuming our code segments needs to work when the gray square is anywhere in the top row, which of the following code segments will always get the robot to the gray square?

REPEAT UNTIL (CAN_MOVE(left)) { MOVE_FORWARD() } ROTATE_LEFT() MOVE_FORWARD()

Which of the following code options can be used to move the robot (the black triangle) to the gray square?

Repeat 3 times: { rotate_left() move_forward() rotate_right() move_forward() ROTATE_RIGHT() move_forward() rotate_left() }

Which of the following best describes the behavior of the mystery procedure?

Return whether or not word is in list

Which of the following best describes the behavior of the Mystery PROCEDURE?

Returns whether or not number is even

Which of the following activities has the greatest potential for compromising your personal privacy?

Sharing the cookies stored in your web browser.

Which of the following activities poses the least potential cybersecurity risk?

Sharing your device's public key used for encryption

Which of the following statements describes an advantage of using a computer simulation to model a real-world object or system?

Simulations allow us to test real-world events without the cost or danger of building and testing the phenomena in the real world.

Which of the following describes a limitation of cloud computing?

Storing data using cloud computing rather than storing on a personal computer may weaken the security of data

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?

Task B

Which of the following is a characteristic of the hierarchical nature of the domain names system (DNS)?

The ability to easily scale the system to allow for a large number of domain names.

Which of the following is a benefit of the fault-tolerant nature of internet routing?

The ability to provide data transmission even when some connections between routers have failed

Which of the following is NOT a characteristic of the redundant nature of routing on the Internet?

The ability to use a hierarchical naming system to avoid naming conflicts

Two computers are built by different manufacturers. One is running a Web server and the other is running a Web browser. Which of the following best describes whether these two computers can communicate with each other across the internet?

The computers can communicate directly because Internet communication uses standard protocols that are used by all computers on the Internet.

A user enters a web address in a browser, and a request for a file is sent to a web server. Which of the following statements are true about how the file is sent to the user?

The file is broken down into several packets for transmission. The packets must be reassembled by the user's device upon receipt.

A user enters a Web address in a browser, and a request for a file is sent to a Web server. Which of the following best describes how the file is sent back to the user?

The file is broken into packets and sent over a network. The packets must be reassembled by the user's computer when they are received. If any packets are missing, the browser re-requests the missing packets.

Which of the following best describes the result of applying this filter to every pixel in the image?

The image will be inverted, bright pixels will become dark and dark pixels will become bright.

Which of the following is true about why it is important to write clear function names?

The name makes it clear what the purpose of the function is.

A program is expressed in a programming language. Which of the following is true of the program?

The program can also be expressed as binary code, which is what the program will be translated to in order to execute on the computer.

x=RANDOM (1,10) y=RANDOM (10,20) DISPLAY (x=y)

The program could display either true or false

In the procedure Mystery written below, the parameter number is a positive integer. Which of the following best describes the result of running the Mystery procedure?

The return value will be a positive integer greater than or equal to the initial value of number

Which of the following could be a possible explanation for the difference in image quality?

The saved image files were compressed with a lossy compression technique.

a construction company is building a tall skyscraper and is considering two different types of material to use for the beams in the building. The company decides to use a computer simulation of each option to determine which material will cause the building to be more stable. Which of the following is not true about the company's plan?

The simulation will not produce usable results because actual data about each material is not available

Which of the following would pose the greatest threat to a user's personal privacy if it were to be leaked to the public?

The user's browser cookies.

Which of the following is a true statement about data compression?

There are trade-offs involved in choosing a compression technique for storing and transmitting data.

Given the following code segment, how can you best describe its behavior?

This code displays the sum of the numbers at the even indices of list

Which of the following is a true statement about the color encoded by this binary sequence: 1110 1001 0111 1100 0000 1111

This color is mostly red

Given the Mystery procedure, how can you best describe the result it returns?

This procedure returns the list without any instance of the given target.

What is the purpose of the Digital Millennium Copyright Act?

To criminalize the act of circumventing, or getting around, access controls that block access to copyrighted works.

Which of the following is a benefit that online shopping websites provide over brick and mortar stores?

Users can easily see product reviews and determine if an item has been satisfactory for a large number of people.

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 search term. Which of the following questions is least likely to be answerable using the trends feature?

What region of the country has the highest population of a particular animal

Which of the following replacments for <MISSING CODE> will cause an infinite loop?

i <----- i MOD 3

According to the domain name system (DNS), which of the following is a sub domain of the domain test.com?

info.test.com

Which of the following code options will make the robot (the triangle) touch all of the gray squares?

move_forward() rotate_left() move_forward() repeat 3 times: { rotate_left() move_forward() move_forward() }

Based on the code segment, how would you best describe the value of resultList?

resultList contains all items from inputList that met the Mystery condition

Based on the code segment, how would you best describe the value of resultList?

resultList contains the result of calling the Mystery procedure on every item in inputList

We want to create an algorithm called swapValues. Given two variables x and y the result should have the values of x and y swapped. Which of the following algorithms correctly swaps the values of x and y?

temp<-----x x<----y y<---- temp

What are the values of x and y as a result of this program code?

x has a value of 3 y has a value of 9

Which of the following expressions is equivalent to the value returned from Mystery(x)

x*5

Which of the following expression is equivalent to the value returned from Mystery(x,y)?

y*x


संबंधित स्टडी सेट्स

Unit 3: The American Party System

View Set

Cisco CCENT/CCNA ICND1 100-101 Chapter 5

View Set

Sociology Ch 2- Culture and Society

View Set

Adaptive Quizzes Chapter 65- Neuro Assessment and Chapter 67- Strokes

View Set

(Concept Checks) Chapter 3: Global Business

View Set

Essentials of Communication Unit 3 Quiz 3 Notes Quiz

View Set