ITS 105
Data Structures and
Algorithm
PART 2 QUIZ
1.What is abstraction?
a) The process of revealing all information to solve a
problem
b) The process of hiding irrelevant information while
focusing on essential concepts
c) The process of simplifying a problem by adding
more details
d) The process of ignoring essential details to focus on
b) The process of hiding irrelevant
irrelevant concepts
information while focusing on
essential concepts
2. Which term describes a process to solve a
problem?
a) Abstraction
b) Algorithm
c) Function
d) Variable
b) Algorithm
3. What does a function consist of?
a) Only variables
b) Only operators
c) A combination of variables and operators
d) Neither variables nor operators
c) A combination of variables and
operators
4. What does the term "heuristic" refer to in
problem-solving?
a) A technique
b) A repetition
c) A set of instructions
a) A technique or b) Repetition
5. What does "iteration" entail in a process?
a) Trying to solve a problem
b) Repetition of an existing process
c) Performing computer operations
b) Repetition of an existing
process
6. What is the function of a "method" in
problem-solving?
a) To attempt problem-solving techniques
b) To repeat a process
c) To provide instructions for computer
operations
c) To provide instructions for
computer operations
7. What is the function of an operator in
computing?
a) It represents mathematical operations
only
b) It instructs the computer to perform
actions on variables
c) It displays error messages in
programming languages
b) It instructs
d) It determines the computer
the font and styletoof text in
a document perform actions on variables
9. Which of the following best describes an
operator in programming?
a) A physical device that controls a
computer system
b) A symbol or word used to direct the
computer to manipulate variables
c) A software tool used for debugging code
d) An algorithm used for encryption
b) A symbol or word used to direct
purposes the computer to manipulate
variables
9. Which of the following best describes an
operator in programming?
a) A physical device that controls a
computer system
b) A symbol or word used to direct the
computer to manipulate variables
c) A software tool used for debugging code
d) An algorithm used for encryption
b) A symbol or word used to direct
purposes the computer to manipulate
variables
10. What is another term for "method" in the
context of procedures?
a) Procedure
b) Solution
a) Procedure
11. Which type of problems can be solved with
algorithms to find an exact answer?
a) Unsolvable Problems
b) Solvable Problems
b) Solvable Problems
12. How would you describe problems that are
indeterminate in their solution for a computer?
a) Unsolvable Problems
b) Solvable Problems
a) Unsolvable Problems
13. What does the phase of "Analysis and
Specification" primarily involve in problem-
solving?
a) Identifying the problem and determining
the solution
b) Understanding the problem and defining
what the solution must do
A or b
14. What is the main objective of "Algorithm
Development" in problem-solving?
a) Identifying the problem and determining the
solution
b) Understanding the problem and defining what
the solution must do
c) Developing a comprehensive, unambiguous
logical sequence of steps to solve the problem
c) Developing a comprehensive,
d) Testing the solution logical
unambiguous to ensure it meets
sequence of the
requirements steps to solve the problem
15. What is the purpose of "Verification of
Algorithm" in problem-solving?
a) Identifying the problem and determining
the solution
b) Understanding the problem and defining
what the solution must do
c) Developing a comprehensive,
unambiguous logical sequence of steps to
solve the problem
d) Testing the solution to ensure it meets
the requirementse) Following steps closely
e) Following stepstoclosely
(manually) (manually)
see if the solution to see
if the solution works
works
16. What does the function
verify_even_odd return when the
input is 5?
a) Even def verify_even_odd(number):
if number % 2 == 0:
b) Odd return "Even"
else: return "Odd"
# Test the function
print(verify_even_odd(5))
Odd print(verify_even_odd(8))
b) odd
17. What does the function
verify_even_odd return when the
input is 8?
a) Even def verify_even_odd(number):
if number % 2 == 0:
b) Odd return "Even"
else: return "Odd"
# Test the function
print(verify_even_odd(5))
Odd print(verify_even_odd(8))
a) even