Deck 1: Introduction
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/102
Play
Full screen (f)
Deck 1: Introduction
1
Programming defines the field of computer science.
False
2
A representation of a problem that includes the relevant aspects of what is being represented is known as an abstraction.
True
3
In order to solve a problem computationally, two things are needed: a representation that captures all the relevant aspects of the problem, and an algorithm that solves the problem by use of the representation.
True
4
In the Man, Cabbage, Goat and Wolf problem example, the state [W, E, W, E] indicates that the cabbage and wolf are on the east side of the river, and the man and goat are on the west side.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
5
Regardless of your skills as a programmer, computing problem solving cannot be performed without the knowledge and use of computer algorithms.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
6
The Traveling Salesman Problem becomes intractable using a brute-force approach for more than twenty cities.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
7
There are more possible chess games that can be played than the number of grains of sand it would take to fill the universe solid.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
8
Any algorithm that correctly solves a given problem must solve the problem in a reasonable amount of time; otherwise it is of limited practical use.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
9
The brute force approach is one of the most widely used algorithmic programming solutions because it is such an efficient problem - solving method.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
10
Any algorithm that solves a general computational problem is referred to as tractable.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
11
Computer science is fundamentally about
A)computational Problem Solving
B) programming
C) software engineering
A)computational Problem Solving
B) programming
C) software engineering
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
12
The idea of a brute force approach can be described as
A)trying all possible solutions to a given problem
B)a computational approach that uses a great deal of memory
C) the most efficient, effective, and direct means to solve a problem
A)trying all possible solutions to a given problem
B)a computational approach that uses a great deal of memory
C) the most efficient, effective, and direct means to solve a problem
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
13
An algorithm is of practical use if it
A) uses the brute force approach
B) can find a solution a problem in a reasonable amount of time
C) bypasses the need for computational problem solving
A) uses the brute force approach
B) can find a solution a problem in a reasonable amount of time
C) bypasses the need for computational problem solving
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
14
An _________ is a finite number of clearly described, unambiguous, "doable" steps that can be systematically followed to produce a desired result for given input in a finite amount of time.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
15
For the Man, Cabbage, Goat, Wolf problem, assume that each state is represented by a sequence of the form [man, cabbage, goat, wolf], in which a value of 0 indicates that the item is on the east side of the river, and a value of 1 indicates that the item is on the west side. For example, [1,0,1,0] would indicate that the cabbage and wolf are on the east side of the river, and the man and goat on the west side.
-Give a list of all the invalid states in this representation.
-Give a list of all the invalid states in this representation.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
16
For the Man, Cabbage, Goat, Wolf problem, assume that each state is represented by a sequence of the form [man, cabbage, goat, wolf], in which a value of 0 indicates that the item is on the east side of the river, and a value of 1 indicates that the item is on the west side. For example, [1,0,1,0] would indicate that the cabbage and wolf are on the east side of the river, and the man and goat on the west side.
-Give a sequence of states that solves the problem (assuming that all items start on the east side of the river, and the village is on the west side.)
-Give a sequence of states that solves the problem (assuming that all items start on the east side of the river, and the village is on the west side.)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
17
All algorithms must terminate after a finite amount of time.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
18
Algorithms are general computational methods for solving specific problems.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
19
The computation that a given computer performs is only as good as the underlying algorithm used.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
20
Because computers can execute instructions very quickly and reliably without error, algorithms and computers are a perfect match.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
21
Which of these is not an algorithm?
A) A pasta recipe
B) A shopping list
C) The steps used in performing long division
A) A pasta recipe
B) A shopping list
C) The steps used in performing long division
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
22
Most algorithms require computers because
A) they would require too much time and/or detail for a person to apply
B) algorithms are only written in programming languages
C) most algorithms are simple and practical enough for computers to understand
A) they would require too much time and/or detail for a person to apply
B) algorithms are only written in programming languages
C) most algorithms are simple and practical enough for computers to understand
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
23
For the Day of the Week algorithm given below, determine the day of the week for the following dates:
(a) September 14, 1864
(b) April 5, 1971
(c) February 21, 2004
(a) September 14, 1864
(b) April 5, 1971
(c) February 21, 2004
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
24
The more voltage levels that the hardware is able to utilize and distinguish, the more reliable the hardware design becomes.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
25
All of the information in a computer system is represented using digits 0-9.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
26
Digital computers are designed to either use binary values 0,1.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
27
In binary representation, each digit represents either the value -1, 0, or 1.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
28
A transistor is an electronic switch that can switch at very high speed.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
29
Integrated circuits, the building blocks of computer hardware, are made up millions or even billions of transistors.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
30
The decimal value of the binary number 1001 is 9.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
31
The binary number 1000 is larger than binary number 0111.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
32
The number following binary number 1011 is 1100.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
33
A byte is a group of (usually) eight bits.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
34
The algorithm for converting a number in base 10 to base 2 is to successively divide the number by ten until the remainder becomes 0.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
35
The fundamental hardware components of computer system are the central processing unit (CPU), main memory, volatile memory, input/output devices, and buses.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
36
Main memory is volatile, meaning that its contents are retained only when power is supplied.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
37
A Central Processing Unit is designed to execute instructions written as a sequence of bits.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
38
A flash (USB) drive is an example of a device containing nonvolatile memory.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
39
Buses provide communication between hardware components.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
40
An operating system is the part of the hardware that controls all the other hardware components of a computer system.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
41
An operating system is what determines the look and feel of a given computer system, not the particular hardware components of the system.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
42
Moore's Law states that the number of transistors that can be put on a silicon chip doubles roughly every two years, first predicted in 1980.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
43
Computer hardware comprises
A) applications and programs used by your computer
B) files stored on your computer
C) the physical parts of a computer system
A) applications and programs used by your computer
B) files stored on your computer
C) the physical parts of a computer system
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
44
All information within a computer system is represented by the use of
A) graphs, charts, numbers, and complex algorithmic languages
B) only two digits, 0 and 1
C) sixteen digits, 0 - 9 and A - F known as hexadecimal representation
A) graphs, charts, numbers, and complex algorithmic languages
B) only two digits, 0 and 1
C) sixteen digits, 0 - 9 and A - F known as hexadecimal representation
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
45
The term bit stands for
A) beta digit
B) binary digit
C) binary integrated transistor
A) beta digit
B) binary digit
C) binary integrated transistor
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
46
Although values represented in base 2 are significantly longer than those represented in base 10, binary representation is used in digital computing because
A) it's impossible to design a switch with more than two options
B) of the resulting simplicity of hardware design
C) early technology wasn't advanced enough to utilize binary representation
A) it's impossible to design a switch with more than two options
B) of the resulting simplicity of hardware design
C) early technology wasn't advanced enough to utilize binary representation
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
47
An operating system
A) is software that manage the hardware of a computer and provides a user interface
B) converts binary data to hexadecimal data for the computer to understand
A) is software that manage the hardware of a computer and provides a user interface
B) converts binary data to hexadecimal data for the computer to understand
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
48
We are used to representing numbers in a decimal system, that is, in base ______.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
49
Any information can be represented by use of only ____symbols.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
50
10011 is a binary number. The number that it translates to in the decimal system that we are used to is ________.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
51
A byte usually consists of ______ bits.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
52
The prediction that the number of transistors that would be able to be put on a silicon chip would double roughly every two years is known as ______.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
53
Convert the following binary numbers to base ten.
-1010
-1010
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
54
Convert the following binary numbers to base ten.
-10000
-10000
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
55
Convert the following binary numbers to base ten.
-1111
-1111
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
56
Convert the following binary numbers to base ten.
-1111111
-1111111
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
57
Convert the following binary numbers to base ten.
-10000001
-10000001
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
58
Show all steps for converting the following base ten values into binary (base 2) representation.
(a) 11
(b) 25
(c) 47
(a) 11
(b) 25
(c) 47
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
59
Charles Babbage is considered the first computer programmer.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
60
While system software is intrinsic to a computer system, application software serves the particular needs of the user.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
61
The statement "Hear are the results." contains a semantic error.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
62
Programming languages are artificial languages, and therefore do not have a clear set of rules of syntax.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
63
Most programs are written in machine code because this is the only thing the CPU can process.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
64
Python is a "high level" programming language?
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
65
Compiled programs generally execute faster than interpreted programs.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
66
Computers do not understand what a program is meant to do, they only follow given instructions.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
67
Program debugging is a small part of program development.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
68
Syntax errors are generally easier to find than logic (semantic) errors.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
69
The two major programming paradigms in use today are imperative programming and object-oriented programming.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
70
A photo editing program is an example of
A) system software
B) application software
C) security software
D) none of the above
A) system software
B) application software
C) security software
D) none of the above
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
71
"Hello there, how are you?" is an example of an English sentence that is
A) syntactically correct
B) semantically incorrect
C) both of the above
A) syntactically correct
B) semantically incorrect
C) both of the above
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
72
"Colorless green ideas sleep furiously" is an example of an English sentence that is
A) syntactically correct
B) semantically correct
C) neither the above
A) syntactically correct
B) semantically correct
C) neither the above
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
73
The Central Processing Unit can only run programs written in _________.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
74
The two major programming paradigms in use today are ______ programming and _______ programming
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
75
For each of the following, indicate whether it contains a syntax error, a semantic (logic) error, or has no syntax or semantic errors.
-n1 = 10
n2 = 20
print('The sum of n1 + n2 is', n2)
-n1 = 10
n2 = 20
print('The sum of n1 + n2 is', n2)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
76
For each of the following, indicate whether it contains a syntax error, a semantic (logic) error, or has no syntax or semantic errors.
-n1 = 5
n2 = 10
n3 = 20
result = n1(n2 + n3)
print('Result =', result)
-n1 = 5
n2 = 10
n3 = 20
result = n1(n2 + n3)
print('Result =', result)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
77
For each of the following, indicate whether it contains a syntax error, a semantic (logic) error, or has no syntax or semantic errors.
-firstname = input('Please enter your first name: ')
lastname = input('Please enter your last name: ')
print('Hello', firstname, lastname)
-firstname = input('Please enter your first name: ')
lastname = input('Please enter your last name: ')
print('Hello', firstname, lastname)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
78
A brute force approach to computational problem solving is never tractable.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
79
Every computational problem has an infinite number of solutions.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
80
There is only one best solution for any given computational problem.
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck