Intro to Computer Science Quizes

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

Consider the following problem, and determine the best type of operation to be used in writing the algorithm to solve the problem. Explain your reasoning. An algorithm is needed that will calculate the commission for employees based upon two levels of sales. Sales greater than $4,000 will result in the sales associate earning a 15% commission. Sales of $4000 or less will result in the sales associate earning a 10% commission.

Get sales If sales > 4000 Then commission = sales * .15Else commission = sales * .10Print commission

Create an algorithm that add all numbers up to a number input by a user doubled starting at 1. For example, if a user enters 200, your algorithm would add 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 which equals 255

Get value for x Set the value of c to 1 While c is less than x, do the following two steps: Add c to the Total Set the value of c to c*2 Print the Total Stop

We should design/select algorithms that perform well for which of these input data cases? Select one: a. best case b. worst case c. no data case d. infinite data case e. average case

b. worst case

In order to designate a statement group, this is what should be done in order to create a "block of code". Select one: a. beginning and ending parenthesis b. line numbers c. all of these are a way to designate a statement group d. indentation e. step numbers

c. all of these are a way to designate a statement group

The study of analyzing algorithms is the same as looking at the _ (blank) _ of algorithms. Select one: a. design b. complexity c. efficiency d. implementation

c. efficiency

Which of these describes how instructions are handled in the Von Neumann architecture? Select one: a. none of these b. encoded as external wired connections c. encoded as decimal values and stored internally d. encoded as digital values on external paper tape e. encoded as binary values and stored internally

c. encoded as decimal values and stored internally

These values establish relationships between tables using information. Select one: a. prepared b. primary c. key d. special

c. key

With regards to the sequential search algorithm, the maximum amount of work is performed if the data being searched for is the ________ value within the list. Select one: a. first b. second c. last d. middle

c. last

What type of algorithm is a sequential search in regards to the average case? Select one: a. order of 1 b. order of logn c. order-n d. order of magnitude n2

c. order-n

The transport layer of the TCP/IP protocol uses which of these to identify a program? Select one: a. URL b. IP address c. port number d. routing table e. program name

c. port number

Which of these should be true about the statements that make up a loop body? Select one: a. they are in alphabetical order b. they are in random order c. they are indented under the loop continuation condition statement d. they are all on the same line e. they all refer to a variable used in the loop continuation condition

c. they are indented under the loop continuation condition statement

Which of the following are layers in the Internet Protocol Hierarchy? Select one: a. Physical layer, URL layer, Network layer, Application Layer b. Physical layer, URL layer, Transportation layer, Application Layer c. URL layer, Data Link Layer, Transportation layer, Application layer d. Physical layer, Data Link layer, Transportation layer, Application layer

d. Physical layer, Data Link layer, Transportation layer, Application layer

Which of these is output by the following algorithm? set the value of x to 0 add 1 to x if the value of x < 1 subtract 1 from the value of x else add 1 to the value of x print the value of x Select one: a. -1 b. 1 c. 0 d. none of these e. 2

e. 2

Which of these should be true of an algorithm? Select one: a. well-ordered b. produces results and stops in a reasonable amount of time c. no ambiguities d. can be effectively computed e. All of these should be true of an algorithm

e. All of these should be true of an algorithm

What is the order of magnitude for an algorithm with a work function f(n) = 2^n + 7n^3 + 100log(n), where the log base is 2? Select one: a. O(7n^3) b. O(log(n)) c. O(100log(n)) d. O(2) e. O(2^n)

e. O(2^n)

The binary search algorithm has which of these orders of magnitude? Select one: a. O(n log(n)) b. O(n^2) c. O(log(n)) d. O(2^n) e. O(n)

e. O(n)

Which of these is an operating system responsibility? Select one: a. control access to and operations on files b. receive user commands c. control access to the computer d. execute programs e. all of these

e. all of these

Which of these makes secretly coded information readable? Select one: a. encryption b. authentication c. authorization d. phishing e. decryption

e. decryption

Which of these is a type of malware that uses many infected machines to simultaneously flood a network target with a crippling number of messages? Select one: a. phishing b. virus c. Trojan horse d. worm e. denial of service

e. denial of service

Which of these is the largest order of magnitude? Select one: a. constant time b. quadratic time c. logarithmic time d. linear time e. exponential time

e. exponential time

When an algorithm starts and does not have a point in which it stops, it is referred to as this. Select one: a. runaway process b. intractable problem c. static algorithm d. black hole process e. infinite loop

e. infinite loop

Which of these is characteristic of a pseudocode infinite loop? Select one: a. after it repeats too many times it stops b. it does nothing c. it prints larger and larger numbers d. it prints an error message and stops e. it keeps going without stopping

e. it keeps going without stoping

Which of these major advances did NOT occur during the fifth generation of computer development? Select one: a. ultra-large-scale integrated circuits b. worldwide networks c. mobile computing d. cloud computing e. time-sliced operating systems

e. time-sliced operating systems

What does the term net neutrality mean regarding the responsibilities of an Internet service provider (ISP)?

Net neutrality regarding the responsibilities of an ISP means that an ISP has to give access to all sites, applications, and content all at the same speed and conditions.

Choose which order of magnitude fits an algorithm model of continued doubling of its work. Select one: a. exponential time b. linear time c. logarithmic time d. constant time e. quadratic time

a. exponential time

Which of the following is a type of cloud computing category? Select one: a. infrastructure b. servers c. slackware d. open-source

a. infrastructure

A _ (blank) _ is an attribute or combination of attributes that uniquely identifies a tuple. Select one: a. primary key b. preferred key c. secondary key d. identification key e. foreign key

a. primary key

Which of these major advances did NOT occur during the fifth generation of computer development? Select one: a. time-sliced operating systems b. mobile computing c. worldwide networks d. ultra-large-scale integrated circuits e. cloud computing

a. time-sliced operating systems

Which of these is a type of malware that spreads by being carried by an infected host file? Select one: a. virus b. denial of service c. Trojan horse d. worm e. phishing

a. virus

We should design/select algorithms that perform well for which of these input data cases? Select one: a. worst case b. best case c. average case d. no data case e. infinite data case

a. worst case

Which of these is output by the following algorithm? set the value of x to 0 add 1 to x if the value of x < 1 subtract 1 from the value of x else add 1 to the value of x print the value of x Select one: a. none of these b. 2 c. 1 d. 0 e. -1

b. 2

Using the hash function encryption, take each letter in the password and replace it with a number representing its place in the alphabet (a -> 1, b -> 2, c ->3, etc.). What would Georgia become? Select one: a. 7 6 15 18 6 9 1 b. 7 5 15 18 7 9 1 c. 7 5 13 15 6 9 1 d. 7 5 13 15 7 9 1

b. 7 5 15 18 7 9 1

Which of these are included in the study of algorithms? Select one: a. their linguistic realizations b. All of these are included in the study of algorithms. c. their hardware realizations d. their formal and mathematical properties e. their applications

b. All of these are included in the study of algorithms.

Which of these is a type of programming error? Select one: a. all of these b. syntax error c. output format error d. logic error e. runtime error

a. all of these

Which of these is the largest order of magnitude? Select one: a. exponential time b. logarithmic time c. quadratic time d. constant time e. linear time

a. exponential time

From the choices below, select the ones that are types of algorithm flows. Select one or more: a. sequential operations b. iterative operations c. reverse operations d. conditional operations

a. sequential operations b. iterative operations d. conditional operations

Which of these devices contains all the shared cable that connects the computers in an Ethernet LAN? Select one: a. switch b. repeater c. transceiver d. bridge e. router

a. switch

The categories of information within a database are typically referred to as a(n) what? Select one: a. element b. attribute c. entity d. tuple

b. attribute

Which of these is characteristic of a pseudocode iterative flow? Select one: a. changes the value of a variable b. a group of statements is performed multiple times c. asks a yes/no question d. all statements are performed once from top to bottom e. performs a mathematical calculation

b. a group of statements is performed multiple times

How is pseudocode analogous to a programming language? Select one: a. has a set known of operations b. all of the answers are correct c. constructs are similar d. Structured

b. all of the answers are correct

These are the first lines of defense against misuse or threats to computer resources and sensitive information. Select one: a. authorization and encryption b. authorization and authentication c. authorization and auditing d. authorization and access

b. authorization and authentication

This type of model involves writing specific equations that outline the behavior of a system that is a continuous time function. Select one: a. decomposed model b. continuous model c. composite model d. unit model

b. continuous model

Select the type of loop that is certain to execute the actions outlined in its body at least one time? Select one: a. if b. do/while c. while d. all of these e. if/then/else

b. do/while

This is a general term used to describe using computers and networks that support electronic exchange of information, goods, as well as services. Select one: a. cloud computing b. ecommerce c. ATM d. server farm

b. ecommerce

In this type of function, a password is mixed-up and rearranged according to a specific formula. Select one: a. stash function b. hash function c. encryption function d. mash function

b. hash function

When searching an unordered list of values, this is an algorithm that could be used to look through the values within the list. Select one: a. random search b. sequential search c. reverse search d. binary search e. swap search

b. sequential search

Which of these should be true about the statements that make up a loop body? Select one: a. they are in alphabetical order b. they are indented under the loop continuation condition statement c. they are all on the same line d. they are in random order e. they all refer to a variable used in the loop continuation condition

b. they are indented under the loop continuation condition statement

This is a more common public-key encryption algorithm when compared to the others. Select one: a. DES b. SHA1 c. AES d. RSA

d. RSA

Which of these is a type of malware that appears to be a beneficial program, but that also performs a hidden malicious task? Select one: a. phishing b. denial of service c. worm d. Trojan horse e. virus

d. Trojan horse

Which of these greatly influences the design of an algorithm to solve a problem? Select one: a. the number of items in the input data b. the experience of the designer c. the organization of the input data d. all of these e. the requirements specified for the algorithm

d. all of these

Which of these governs what a verified user is allowed to do? Select one: a. decryption b. authentication c. encryption d. authorization e. phishing

d. authorization

From the list below, choose the one that defines how a computer would implement an algorithm? Select one: a. with common sense b. randomly c. intelligently d. mechanically e. while looking ahead

d. mechanically

When searching an unordered list of values, this is an algorithm that could be used to look through the values within the list. Select one: a. reverse search b. random search c. binary search d. sequential search e. swap search

d. sequential search

Which of these is ambiguous? Select one: a. add 1 to the value of count b. Do either part 1 or part 2 c. None of these are ambiguous. d. while the value of year < 2015 print the year e. if the value of age < 18 do part 1

d. while the value of year < 2015 print the year

A wrestling tournament has 256 players. Each match includes 2 players. The winner each match will play another winner in the next round. The tournament is single elimination, so no one will wrestle after they lose. The 2 players that are undefeated play in the final game, and the winner of this match wins the entire tournament. How would you determine the winner? Here is one algorithm to answer this question. Compute 256/2 = 128 to get the number of pairs (matches) in the first round, which results in 128 winners to go on to the second round. Compute 128/2 = 64, which results in 64 matches in the second round and 64 winners, to go on to the third round. For the third round compute 64/2 = 32, so the third round has 64 matches, and so on. The total number of matches is 128 + 64 + 32+ .... Finish this process to find the total number of matches.

256/2 = 128 128/2 = 64 64/2 = 32 32/2 = 16 16/2 = 8 8/2 = 4 4/2 = 2 2/2 = 1

Thoroughly describe what a Caesar cipher does by using an example.

A Caesar cipher replaces a plaintext letter with a different letter a fixed number of set places in the alphabet. An example of this would be if you shifted 4, then B would become F, and A would become D.

What is the definition of phishing and what are its effects on sensitive information? How does an end user perceive a phishing attempt?

Phishing is used by people to obtain sensitive information by acting like an authorized source. The effects of phishing are that credit card data could be breached, a breach of information security, or even the stealing of personal and financial data. Since phishers use text or email to look like a trustworthy company or sender, therefore end-users must be aware of how informal the message looks. Since some phishing attempts may look like they were using informal speech when acting as a company. Also, if the end-user thinks there is a phishing attempt from what looks like a trusted company, then they need to contact that company through other means rather than through the email or text.

This algorithm prints a out a list of values: Get input for the value of x Declare the value of c to be 1 While c is equal to or less than x, do the following five steps: Set the value of r to one-half x While r is greater than or equal to 1, do the following two steps: Print the value of r Set the value of r to one-half its former value Add 1 to the value of c Stop Complete the following: Let x be the value 2 and then write out all the values output by steps above. Let x be the value 3 and then write out all the values output by steps above.

1.) The value of x is 2 the value of c is 1 while c is <= x, set the value of r to 1/2 x r= 1/2 (2) print r= 1 while r is <= 1, r = 1 r = 1/2 (1) r = 0.5 c = 1 +1 c = 2 2.) The value of x is 3 the value of c is 1 while c is <= x, set the value of r to 1/2 x r= 1/2 (3) print r= 1.5 while r is <= 1.5, r = 1.5 r = 1/2 (1.5) r = 1.13 c = 1 +1 c = 2

Considering what an algorithm is, describe an algorithm that completes a process. Recall the important considerations for this chapter in regard to creating an algorithm. You cannot use any of the examples found in the textbook or online.

An algorithm that completes a process would be starting your car: grab keys open car door get into car lift car keys to be in front of ignition slide key into ignition turn key to the right if you hear a rumble, you have successfully started your car if you do not hear this noise, then call a mechanic. This algorithm completes the process of starting your car.

Write an algorithm that calculates the total baggage fee a customer pays at the airport. The algorithm should input the number of bags being checked and the baggage fee per bag. The algorithm should calculate the total baggage fee as the number of bags multiplied by the baggage fee and print the total baggage fee.

Calculate total baggage fee at the airport- Input number of bags checked for each bag checked add number of fee to each bag if bag has been checked and fee has been added then multiply number of bags by baggage fee Print total baggage fee STOP

Describe in detail how potential customers can learn about a URL.

Potential customers can learn about a URL through printed advertising that shows the URL of the website. The link to the site's URL can also be linked with a customer's search engine result. So the next time a customer chooses to open their search browser and search for something using their search engine, they will be able to see your URL to the website.

Is it possible that recursion is the major reason for using a functional language? If not, why is the case?

Recursion is important when it comes to programming, so I would think that it could be the major reason for using a functional language. It can make your code easier to read, but since recursion keeps the values until the problem is solved, then it uses more memory. And depending on the complexity of the algorithm and the amount of data that is being processes, it could consume a great deal of memory.

What do the Physical layer protocols govern? What do they specify? What is the goal of the Physical layer?

The Physical layer governs the physical links between devices like plugs, connectors, transmission media, and connectors. The Physical layers also transmits raw bits over physical data links that connect to network nodes. Lastly, the goal of the Physical layer is to generate electrical waves or signals to send to a media one at a time. It also governs wireless communications as well.

Describe in detail what a metalanguage like XML is and why it is important for a browser.

XML is short for "Extensible Markup Language". What XML does is it enhances the functionality of the web by allowing you to locate your information in a way that makes it flexible and accurate. It also gives you a base when it comes to creating documents and document systems. -a reference of how XML is important to browsers because of it's cross-platform compatibility through the use of tag elements and schema.

Which of these procedural programming languages was targeted for development of systems programs such as operating systems and device drivers? Select one: a. C/C++ b. Fortran c. Python d. Ada e. COBOL

a. C/C++

Which of these special-purpose programming languages is targeted for use with databases? Select one: a. SQL b. PHP c. JavaScript d. XML e. HTML

a. SQL

In an actual SQL command, how is the restriction operation typically indicated? By the Word _ (blank) _ Select one: a. Where b. Restrict c. And d. Or

a. Where

How is pseudocode analogous to a programming language? Select one: a. all of the answers are correct b. constructs are similar c. Structured d. has a set known of operations

a. all of the answers are correct

Which of these is a characteristic of abstraction? Select one: a. all of these b. the basis for top-down design c. allows us to manage large, complex systems d. allows us to understand large, complex systems e. separates high-level view from low-level detail

a. all of these

Which of these is NOT a basic pseudocode sequential operation? Select one: a. conditional b. output c. computation d. All of these are basic pseudocode sequential operations. e. input

a. conditional

Which of these is NOT a basic pseudocode sequential operation? Select one: a. conditional b. output c. input d. All of these are basic pseudocode sequential operations. e. computation

a. conditional

Choose which order of magnitude fits an algorithm model of continued doubling of its work. Select one: a. exponential time b. constant time c. quadratic time d. linear time e. logarithmic time

a. exponential time

From the choices below, choose the one that is not true in regard to an algorithmic solutions to a problem. Select one: a. Some problems may have a solution, but none has been discovered yet. b. All of these are true statements. c. Every problem has an algorithmic solution. d. Some problems have an algorithmic solution that would take too long to execute. e. Some problems have no algorithmic solution.

c. Every problem has an algorithmic solution.

This term is the process of keeping information secure and protecting it from those individuals that should not have access to the information. Select one: a. Network security b. Network assurance c. Information security d. Information assurance

c. Information security

What is the order of magnitude for an algorithm with a work function f(n) = 2^n + 7n^3 + 100log(n), where the log base is 2? Select one: a. O(2) b. O(100log(n)) c. O(2^n) d. O(7n^3) e. O(log(n))

c. O(2^n)

If you have a choice, which of these orders of magnitude should you choose? Select one: a. O(n log(n)) b. O(2^n) c. O(n) d. O(n^2) e. O(log(n))

c. O(n)

In this search algorithm, the best case occurs when the value being searched for is the first value in the list. Select one: a. The Copy-Over b. Converging-Pointers c. Sequential d. Exponential

c. Sequential

Which of these best describes an index? Select one: a. an alphabetical list of pointers to items b. a list of items c. a variable used as a pointer into a list of items d. a line number in an algorithm e. an alias for a variable

c. a variable used as a pointer into a list of items

Which of these advantages is provided by a high-level programming language? Select one: a. use standard mathematical notation b. the programmer can take a macroscopic view of tasks c. all of these d. programs are portable across machines

c. all of these

Which of these are problems with wireless data communications? Select one: a. higher error rates b. environmental problems c. all of these d. security e. line of sight required between transmitters

c. all of these

Which of these is a characteristic of abstraction? Select one: a. separates high-level view from low-level detail b. allows us to understand large, complex systems c. all of these d. allows us to manage large, complex systems e. the basis for top-down design

c. all of these

Which of these is an attribute of a preferred algorithm? Select one: a. ease of understanding b. all of these c. correctness d. efficiency e. elegance

c. all of these

Which of these software package activities is the responsibility of computer scientists? Select one: a. designing b. testing c. all of these d. specifying e. building

c. all of these

Which of these major advances occurred during the first generation of computer development? Select one: a. use of binary arithmetic b. use of vacuum tubes for storage c. all of these occurred during the first generation of computer development d. first commercial computers e. first symbolic programming languages

c. all of these occurred during the first generation of computer development

When looking at the efficiency of a sequential search, the smaller the list of items, then _ (blank) _ work must be done to search it. Select one: a. no b. more c. less d. about the same compared to other lists

c. less

How many statements can be in the true branch of an if/then/else statement? Select one: a. none b. at most one c. one or more d. exactly one e. two

c. one or more

Which of these is NOT a layer of the abstract computing stack? Select one: a. the Software World b. the Hardware World c. the Algorithmic Foundations of Computer Science d. the Automation Factory e. the Virtual Machine

c. the Algorithmic Foundations of Computer Science

Which of these major advances occurred during the first generation of computer development? Select one: a. first symbolic programming languages b. use of binary arithmetic c. use of vacuum tubes for storage d. first commercial computers e. all of these occurred during the first generation of computer development

c. use of vacuum tubes for storage

From the list below, choose the one that starts an iterative statement. Select one: a. and b. input c. while d. then e. if

c. while

How many instances could a while loop be completed? Select one: a. one b. all of these c. zero d. two e. infinitely many

c. zero

Which of these special-purpose programming languages is targeted for the creation of standard web pages that contain standard tags? Select one: a. XML b. PHP c. SQL d. JavaScript e. HTML

e. HTML

Which order of magnitude is linked most closely with a sequential search algorithm? Select one: a. O(n^2) b. O(n log(n)) c. O(log(n)) d. O(2^n) e. O(n)

e. O(n)

Choose from the following a confounding factor when considering algorithm experimental assessment in computer science. Select one: a. Differences in hardware platforms b. Differences in input content / organization c. Requires the algorithm to already be implemented d. Differences in software platforms e. all of these

e. all of these

Using this allows a loop to complete exactly the amount of times that it needs to. Select one: a. performs a mathematical calculation b. search c. pseudocode d. product e. counter

e. counter

Which of these devices can transmit messages between different types of networks? Select one: a. repeater b. switch c. transceiver d. bridge e. router

e. router


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

MKT 300: Chapter 16: Retailing and Omnichannel Marketing

View Set

Calculation of maintenance fluids

View Set

Chapter 27: Lower Respiratory Problems

View Set

Pharm Ch 3: Toxic Effects of Drugs

View Set

Chapter 35: Assessment of Immune Function

View Set

testout cyberdefense pro chapter 10

View Set

مصادر الثقافة الإسلامية(القرآن الكريم)

View Set

Ch. 7 Study Questions: True/False

View Set