1/83
Looks like no tags are added yet.
Which of the following are the benefits of cryptography?
Confidentiality, Integrity, Authentication, Non-repudiation
T/F - In public/private key cryptography if some data is encrypted with a public key then it can only be decrypted by the corresponding private key.
True
T/F - In public/private key cryptography if some data is encrypted with a private key then it can only be decrypted by the corresponding public key.
True
What is the name of the process of encrypting text by shifting (rotating) letters by a fixed number?
Caesar Cipher
T/F - Any polyalphabetic cipher is perfectly immune to frequency analysis.
False
T/F - Monoalphabetic substitution ciphers are (relatively) easily cracked via frequency analysis.
True
Which of the following is not a required property of an Algorithm?
Aesthetics
T/F - For each problem or class of problems, there may be many different algorithms.
True
T/F - Natural language is the most concise and precise way to express algorithms.
False
T/F - Flow charts symbols are mostly standardized.
True
Whatwill be printed when the following statements execute?
origlist = [45, 76, 34, 55]
newlist = [origlist] * 3
print(newlist)
[[45, 76, 34, 55], [45, 76, 34, 55], [45, 76, 34, 55]]
newlist is a list of three reference to origlist that were created by the repetition operator.
What will be printed when the following statements execute?
n = 1
x = 2
while n < 5:
n = n + 1
x = x + 1
n = n + 2
x = x + n
print(n, x)
7 15
What is the first line of code the python interpreter executes?
1 def sumTo(aBound):
2 theSum = 0
3 for aNumber in range(1, aBound + 1):
4 theSum - theSum + aNumber
5
6 return theSum
7
8
line 8
What will be printed when the following statement execute?
list = [3, 67, "cat", 3.14, False]
print(len(list))
5
What will be printed when the following statements execute?
alist = [1, 3, 5]
blist = [2, 4, 6]
print(alist + blist)
[1, 3, 5, 2, 4, 6]
What will be printed when the following statements execute?
alist = [4, 2, 8, 6, 5]
blist = alist * 2
blist[3] = 999
print(alist)
[4, 2, 8, 6, 5]
What will be printed when the following statements execute?
many_hellos = "hello" * 10
print(many_hellos)
hellohellohellohellohellohellohellohellohellohello
What will be printed when the following statements execute?
list = [3, 67, "cat", 3.14, False]
print(list[3])
3.14
What will be printed when the following statements execute? (The real output may require/produce several lines, for the ease of formatting, they will appear in one line.)
if 4 + 5 == 10:
print("TRUE")
else:
print("FALSE")
print("TRUE")
FALSE TRUE
What will be printed when the following statements execute?
origlist = [45, 76, 34, 55]
print(origlist * 3)
[45, 76, 34, 55, 45, 76, 34, 55, 45, 76, 34, 55]
What will be printed when the following statements execute?
list = [3, 67, "cat", 3.14, False]
print(3.14 in list)
True
What will be printed when the following statements execute? (The real output may require/produce several lines, for the ease of formatting, they will appear in one line.)
count = 0
while count < 5:
print(count)
count += 1
0 1 2 3 4
What will be printed when the following statements execute? (The real output may require/produce several lines, for the ease of formatting, they will appear in one line.)
for person in ["Ellis", "Sam", "JW"]:
print("Hi", person)
Hi Ellis Hi Sam Hi JW
What will be printed when the following statements execute?
fruit = ["apple", "orange", "banana", "cherry"]
print(fruit + [6, 7, 8, 9])
['apple', 'orange', 'banana', 'cherry', 6, 7, 8, 9]
What value is printed when the following statement executes?
print(18 // 4)
4
What will be printed when the following statements execute?
fruit = ["apple", "orange", "banana", "cherry"]
print("apple" in fruit, "pear" in fruit)
True False
What will be printed when the following statements execute?
day = "Thursday"
day = 32.5
day = 19
print(day)
19
What value is printed when the following statement executes?
print(18 % 4)
2
What will be printed when the following statements execute? (The real output may require/produce several lines, for the ease of formatting, they will appear in one line.)
name = "John"
age = 23
if name == "John" and age == 23:
print("Your name is John, and you are also 23 years old.")
if name == "John" or name == "Rick":
print("Your name is either John or Rick.")
Your name is John, and you are also 23 years old. Your name is either John or Rick.
What value is printed when the following statement executes?
print(18/4)
4
The author states that it is an exaggeration that algorithms:
rule the world
Deangelis discusses how Alan Turing
published a set of equations that tried to explain patterns we see in nature
The article does NOT describe the following weird correlations reported by Machine Learning:
CS Doctorates awarded during year arcades had higher revenue.
Every recursive algorithm must possess:
a base case, a recursive case, a logical guarantee that the base case is eventually reached
T/F - Divide and conquer algorithms recursively break down a problem into sub-problems until these become trivial to be solved directly
True
T/F - Horners Method is a method for computing subsequent sums.
False
The computation complexity for the following snippet of code is..
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
//... single operation here
}
}
O(N^2)
Fill in the blank:
$ ls
2017 2018 chicken_soup_recipe.txt
$ mkdir baking
$ ls
___________________
2017 2018 baking chicken_soup_recipe.txt
From the command line, you can navigate through files and folder son your computer, just as you would with Finder on Mac OS or Windows Explorer on Windows. The difference is that the command line__________.
is fully text-based
Fill in the blank:
$ ls
2017 2018 chicken_soup_recipe.txt
$ mkdir baking
$ cd baking
$ ls
______________________
NOT:
baking
2017 2018 baking
2017 2018 chicken_soup_recipe.txt
The mkdir command stands for __________. It takes in a directory name as (a)an ____________, and then _____________ in the current working directory.
"make directory", argument, creates a new directory
Fill in the blank:
$ ls
2017 2018 chicken_soup_recipe.txt
$ touch beef_soup_recipe.txt
$ ls
__________
2017 2018 beef_soup_recipe.txt chicken_soup_recipe.txt
T/F - CS student, Alex Chicken-Soup, types in the Unix command "ls" and his terminal displayed the following:
2017 2018 chicken_soup_recipe.txt
"ls" is an example of a command - a directive to the computer to perform a specific task.
True
CS student, Alex Chicken-Soup, wants to see the full pathname of the working directory using one Unix command, what command should Chicken-Soup use?
ls
pwd
CS student, Alex Chicken-Soup, wants to move up on directory using one Unix command. What command should Chicken-Soup use?
pd ..
mkdir .
ls ..
pd .
mkdir ..
us .
cd .
touch .
cd ..
In Unix, what does the command "ls" do?
Lists the files and directory in the current directory.
In Unix, the command "cd" stands for ________. "cd" can _________
"change directory", change the working directory
Requirements gathering is ...
A process of finding and discovering the requirements of a system from various sources.
Which of the following are examples of "Requirements Struggles"?
Contradictory requests
T/F - "Waterfall software development" is an updated versino of "Agile software development".
False
The "Analyze -- Design -- Implement -- Evaluate" loop is an approach used in _______ design.
User Interface
Unified Modeling Language (UML) diagrams are used in _____ design.
Object Oriented
Which of the following promote maintainability and reuse?
High cohesion
T/F - The branching feature of git allows developers to experiment without affecting the main project.
True
T/F - There are no tools that allow you to visualize git repository branches.
False
Which of the following define "black-box" testing most accurately?
Same as white-box testing
Testing software after it has crashed
Unit testing specific parts of code
Testing without the knowledge of the internals < ------
Which of the following do not belong to the list of ten principles of user centered design?
Perform competitor research < -----
Be consistent
Users do not know what they want < ---------
Design for the users and their tasks
Present information clearly
Which of the following are the four steps in the iterative (cyclical) design model?
Design
T/F - ARPANET is the internet of tomorrow (Web 5.0)
False
Which of the following missions are attributed to network protocols?
Ensuring order of transmitted packets
The TCP/IP model has how many layers?
4 (with margin: 0)
T/F - IPV6 offers 50% more address space than IPV4
False
Which of the following acronyms best relates to this metaphor: "it is like a phone book where the URLs(names) are mapped to the corresponding IP addresses(phone numbers)".
ICAN
DNS
T/F - The transport layer can only communicate with the application layer and the internet layer.
True
TCP/IP is a protocol at which of the following layers?
Application
Transport
What prevents packets from traveling between nodes indefinitely?
ICMP
MAC
ARP
TTL
In sending packets through a network, the TTL dield is useful because:
It shows the maximum life time for sending a packet in the network
It prevents the loops between two routers sending packets back and forth
It helps identify which packet is consuming the network resources
Which statement is TRUE for the packets sent through the network:
All have a fixed size
their size grows based on the size of the network
There is no measure for the size of the packet
The size differs based upon their content
T/F - A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
True
T/F - In the context of modern web pages JavaScript can not modify HTML.
False
T/F - NodeJS uses the same Javascript engine as Chrome.
True
T/F - You can create a basic NodeJS server without any Node modules.
False
T/F - Artificial Intelligence (AI) is a subset of Machine Learning (ML).
False
Which of the following is used for unsupervised learning?
K nearest neighbor (KNN)
Support Vector Machine (SVM)
K-means clustering
Select all that are related to supervised learning
k-nearest neighbors (KNN)
Which is the python package used for machine learning?
gmplot
urllib.request
flask
matplotlib
scikit-learn
T/F - A CAPTCHA is a Turing test
True
The common elements of an algorithm are:
Input, computation, selection, iteration, output, variables
Which of the following is not true about cognitive fluidity:
it is a collision of rationality and intuition leading to counterproductive behaviors in problem-solving activities.
A popular one-way algorithm for encrypting password is:
rainbow tables
private key generation
salt
RSA
SHA-256
Which of the following is not a principles behind the Agile Manifesto:
Welcome changing requirements
Reflect on how to become more effective regularly
Deliver working software frequently
Develop in isolation from business people < ------
Which of the following is not true of a distributed version control system?:
Facilitates collaboration between people
Requires there be only one copy of the repository
What is time complexity of foo()?
def foo(n):
res = 0
i = n
while i > 1:
i = i/2
res += i
return res
O(log n)
Which of the following would clone a repository, create a blank file and have that file added back on the remote repository
470 git clone https://git.cs.vt.edu/maellis1/example-showing-students.git471 cd example-showing-students/
472 touch blank.txt
473 git add blank.txt
474 git commit -m "just adding a file"
475 git push