compsci

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 29

flashcard set

Earn XP

Description and Tags

help

30 Terms

1

What are the values of first and second as a result of executing the code segment?


first= 100, second=100

New cards
2

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





D) The Internet is a network of interconnected networks, and the World Wide Web is a system of linked pages, programs, and files that is accessed via the Internet.

New cards
3




Game, yellow black red


c) 4

New cards
4

Which of the following best describes a direct benefit in using redundant routing on the Internet?


C) Redundancy often allows messages to be sent on the network even if some network devices or connections have failed.

New cards
5


What is the decimal value for the jump control?


c) 24

New cards
6



What control is represented by the decimal value 15 ?


D) ↓

New cards
7


A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements.


C) Lines 8 and 12 should be interchanged.

New cards
8

The drawLine procedure is to be used to draw the following figure on a coordinate grid.



A)

New cards
9


A local router is configured to limit the bandwidth of guest users connecting to the Internet. Which of the following best explains the result of this configuration as compared to a configuration in which the router does not limit the bandwidth



Guest users will be restricted in the maximum amount of data that they can send and receive per second.

New cards
10












The question below uses a robot in a grid of squares. The robot is represented as a triangle, which is initially in the center square and facing toward the top of the grid.

The following code segment is used to move the robot in the grid.

count 

 1

REPEAT 4 TIMES

{

REPEAT count TIMES

{

MOVE_FORWARD()

}

ROTATE_LEFT()

count 

 count + 1

}

Which of the following code segments will move the robot from the center square along the same path as the code segment above?

a)

New cards
11

In the following procedure, the parameter n is an integer greater than 2.

Which of the following best describes the value returned by the procedure?




D) The procedure returns the sum of the integers from 1 to n.

New cards
12

Which of the following best describes a challenge involved in using a parallel computing solution?

A) A parallel computing solution may not be appropriate for an algorithm in which each step requires the output from the preceding step.

New cards
13

In the flowchart below, assume that j and k are assigned integer values.

 

Which of the following initial values of j and k will cause the algorithm represented in the flowchart to result in an infinite loop?

D) j = 5, k = -5

New cards
14

Based on the algorithm represented in the flowchart, what value is displayed if j has the initial value 3 and k has the initial value 4 ?

d) 12

New cards
15

Which of the following best explains how data is transmitted on the Internet?

a) Data is broken into packets, which can be sent along different paths.

New cards
16

A company delivers packages by truck and would like to minimize the length of the route that each driver must travel in order to reach delivery locations. The company is considering two different algorithms for determining delivery routes.

B) Algorithm II uses a heuristic approach to provide an approximate solution in reasonable time.

New cards
17

In a science experiment, result X is expected to occur 25% of the time and result Y is expected to occur the remaining 75% of the time. The following code segment is intended to simulate the experiment if there are 100 trials.

Which of the following changes to the code segment will ensure a correct simulation of the experiment?

A)

Replacing line 9 with ELSE

New cards
18

A city maintains a database of all traffic tickets that were issued over the past ten years. The tickets are divided into the following two categories.

  • Moving violations

  • Nonmoving violations

The data recorded for each ticket include only the following information.

  • The month and year in which the ticket was issued

  • The category of the ticket

Which of the following questions CANNOT be answered using only the information in the database?

B) In the past ten years, were nonmoving violations more likely to occur on a weekend than on a weekday?

New cards
19

A store uses binary numbers to assign a unique binary sequence to each item in its inventory. What is the minimum number of bits required for each binary sequence if the store has between 75 and 100 items in its inventory?

C) 7

New cards
20

What value is displayed as a result of executing the code segment?

  1. 3

Assume that applying either of the filters will not change the relative order of the rows remaining in the spreadsheet.

Which of the following sequences of steps can be used to identify the desired restaurant?

  1. Filter by number of ratings, then filter by payment type, then sort by rating

  2. Filter by number of ratings, then sort by rating, then filter by payment type

  3. Sort by rating, then filter by number of ratings, then filter by payment type

d) 1 2 and 3

New cards
21

A student wants to count the number of restaurants in the spreadsheet whose price range is $30 or less and whose average customer rating is at least 4.0. For a given row in the spreadsheet, suppose prcRange contains the price range as a string and avgRating contains the average customer rating as a decimal number.

Which of the following expressions will evaluate to true if the restaurant should be counted and evaluates to false otherwise?

B) (avgRating ≥ 4.0) AND ((prcRange = "lo") OR (prcRange = "med"))

New cards
22

Which of the following is an example of an attack using a rogue access point?

An unauthorized individual gains the ability to view network traffic by connecting to a network router that uses weak or no security measures.

New cards
23

Which of the following best explains the ability to solve problems algorithmically?

D)There exist some problems that cannot be solved algorithmically using any computer.

New cards
24

Which of the following best explains how symmetric encryption algorithms are typically used?

a) Symmetric encryption uses a single key that should be kept secret. The same key is used for both encryption and decryption of data.

New cards
25

Delivery trucks enter and leave a depot through a controlled gate. At the depot, each truck is loaded with packages, which will then be delivered to one or more customers. As each truck enters and leaves the depot, the following information is recorded and uploaded to a database.

  • The truck’s identification number

  • The truck’s weight

  • The date and time the truck passes through the gate

  • Whether the truck is entering or leaving the depot

Using only the information in the database, which of the following questions CANNOT be answered?

B) What is the average number of customer deliveries made by each truck on a particular day?

New cards
26

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list.

For example, if utensils initially contains  ["fork", "spoon", "tongs", "spatula", "whisk"], it should contain ["whisk", "fork", "spoon", "tongs", "spatula"] after executing the code segment.

Which of the following code segments transforms the list as intended?

c)

New cards
27

A certain computer has two identical processors that are able to run in parallel. The following table indicates the amount of time it takes to execute each of four processes on a single processor. Assume that none of the processes is dependent on any of the other processes.

Process

Execution Time on

Either Processor

P

30 seconds

Q

10 seconds

R

20 seconds

S

15 seconds

Which of the following parallel computing solutions would minimize the amount of time it takes to execute all four processes?

  1. Running processes P and Q on one processor and processes R and S on the other processor

New cards
28

In the following procedure, the parameter age represents a person’s age. The procedure is intended to return the name of the age group associated with age. People who are under 18 are considered minors, people who are 65 and older are considered senior citizens, and all other people are considered adults. The procedure does not work as intended.

Removing which two lines of code will cause the procedure to work as intended?

Select two answers.

  1. Line 8

C) Line 10

New cards
29

In a certain video game, players are awarded bonus points at the end of a level based on the value of the integer variable timer. The bonus points are awarded as follows.

  • If timer is less than 30, then 500 bonus points are awarded.

  • If timer is between 30 and 60 inclusive, then 1000 bonus points are awarded.

  • If timer is greater than 60, then 1500 bonus points are awarded.

Which of the following code segments assigns the correct number of bonus points to bonus for all possible values of timer ?

Select two answers.

A and d

New cards
30

The following code segment is intended to remove all duplicate elements in the list myList. The procedure does not work as intended. For which of the following contents of myList will the procedure NOT produce the intended results?

A and d

New cards
robot