COMPUTER SCIENCE | FROM QUESTION TO PERFECTION|
STUDY WITH CONFIDENCE!
Course Code:
Course Title: COMPUTER SCIENCE.
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 100
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in
Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not
permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
,declarative knowledge Answer: Statements of fact.
Knowledge related to "what is"—that is, to the nature of how things are, were, or will be.
Eg, the sky is blue
Cognitive components that represent fact.
imperative knowledge Answer: a recipe or "how-to" knowledge.
1. Face the students at the front of the room.
2. Count up 3 rows.
3. Start from the middle section's left side.
4. Count to the right 1 chair.
5. Reach under chair and pick up the pen
What is an algorithm? Answer: A set of well-defined logical steps that must be taken to perform
a task.
A set of steps that create an ordered approach to a problem solution.
1. A sequence of simple steps
2. flow of control process that specifies when each step is executed.
3. a means of determining when to stop.
what is a fixed program computer? Answer: A computer designed to do very specific things.
Eg. A desk calculator. It cannot run a processor. Changing the program of a fixed-program
machine requires rewiring, restructuring, or redesigning the machine.
What is a stored program computer? Answer: A computer that stores in memory to enable it to
perform a variety of tasks in sequence or intermittently. The idea was introduced in the late
1940s by John von Newemann, who proposed that a program be electronically stored in binary-
number format in a memory device so that instructions could be modified by the computer as
determined by intermediate computational results
A computer that is designed to load and calculate a particular program.
Turing Complete Answer: A programming language that can implement any theoretically
possible algorithm.
Objects Answer: Objects represent data.
Programs manipulate data objects in order to get out parts of those objects.
Objects are scalar or non-scalar
Object Type Answer: Every object has a type associated with it that tells us what kind of thing
it is.
APPHIA – Crafted with Care and Precision for Academic Excellence.
2
, That type tells programs whether they can act on it or not.
If a program is expecting a number and it receives a string it is not going to do anything with it.
A program Answer: is a sequence of definitions and commands.
definitions are evaluated
commands are executed by Python interpreter in a shell. The commands instruct interpreter to
do something.
Programs can be typed directly in a shell or stored in a file that is read into the shell and
evaluated.
Programs manipulate data objects
Scalar objects Answer: Cannot be subdivided into smaller parts
Non-Scalar objects Answer: Have an internal structure that can be accessed.
Expressions? i + j
example of scalar objects Answer: int
float
bool
string
NoneType
legal expression Answer: code that follows the Code Rules for a language. semantically and
syntactically correct
expression Answer: To combine objects and operators we use a standard form: <object>
<operator> <object>.
Any expression that is syntactically valid, has a value, which is itself a type.
Abstracting expressions Answer: give names to values of expressions.
pi = 3.14159
changing bindings Answer: re-bind variable names using new assignment statements
The previous value may still be stored in memory but lost the handle for it.
branching programs Answer: They can run down many different paths depending on the
outcome of simple tests
Simple tests - Boolean
Conditional tests
How do we create and walk through the branches?
APPHIA – Crafted with Care and Precision for Academic Excellence.
3
STUDY WITH CONFIDENCE!
Course Code:
Course Title: COMPUTER SCIENCE.
Programme:
Academic Year: 2026/2027
Duration: 2 Hours
Total Marks: 100
Candidate Instructions:
1) Write your Registration Number on every answer booklet used.
2) Answer ALL questions in Section A and ANY TWO (2) questions in
Section B.
3) Read each question carefully before answering.
4) Begin each question on a new page.
5) The marks for each question are indicated in brackets.
6) This paper consists of several printed pages, including this page.
7) Ensure your copy is complete before the examination begins.
8) Unauthorized materials and communication with other candidates are not
permitted.
Turn Over.
APPHIA – Crafted with Care and Precision for Academic Excellence.
1
,declarative knowledge Answer: Statements of fact.
Knowledge related to "what is"—that is, to the nature of how things are, were, or will be.
Eg, the sky is blue
Cognitive components that represent fact.
imperative knowledge Answer: a recipe or "how-to" knowledge.
1. Face the students at the front of the room.
2. Count up 3 rows.
3. Start from the middle section's left side.
4. Count to the right 1 chair.
5. Reach under chair and pick up the pen
What is an algorithm? Answer: A set of well-defined logical steps that must be taken to perform
a task.
A set of steps that create an ordered approach to a problem solution.
1. A sequence of simple steps
2. flow of control process that specifies when each step is executed.
3. a means of determining when to stop.
what is a fixed program computer? Answer: A computer designed to do very specific things.
Eg. A desk calculator. It cannot run a processor. Changing the program of a fixed-program
machine requires rewiring, restructuring, or redesigning the machine.
What is a stored program computer? Answer: A computer that stores in memory to enable it to
perform a variety of tasks in sequence or intermittently. The idea was introduced in the late
1940s by John von Newemann, who proposed that a program be electronically stored in binary-
number format in a memory device so that instructions could be modified by the computer as
determined by intermediate computational results
A computer that is designed to load and calculate a particular program.
Turing Complete Answer: A programming language that can implement any theoretically
possible algorithm.
Objects Answer: Objects represent data.
Programs manipulate data objects in order to get out parts of those objects.
Objects are scalar or non-scalar
Object Type Answer: Every object has a type associated with it that tells us what kind of thing
it is.
APPHIA – Crafted with Care and Precision for Academic Excellence.
2
, That type tells programs whether they can act on it or not.
If a program is expecting a number and it receives a string it is not going to do anything with it.
A program Answer: is a sequence of definitions and commands.
definitions are evaluated
commands are executed by Python interpreter in a shell. The commands instruct interpreter to
do something.
Programs can be typed directly in a shell or stored in a file that is read into the shell and
evaluated.
Programs manipulate data objects
Scalar objects Answer: Cannot be subdivided into smaller parts
Non-Scalar objects Answer: Have an internal structure that can be accessed.
Expressions? i + j
example of scalar objects Answer: int
float
bool
string
NoneType
legal expression Answer: code that follows the Code Rules for a language. semantically and
syntactically correct
expression Answer: To combine objects and operators we use a standard form: <object>
<operator> <object>.
Any expression that is syntactically valid, has a value, which is itself a type.
Abstracting expressions Answer: give names to values of expressions.
pi = 3.14159
changing bindings Answer: re-bind variable names using new assignment statements
The previous value may still be stored in memory but lost the handle for it.
branching programs Answer: They can run down many different paths depending on the
outcome of simple tests
Simple tests - Boolean
Conditional tests
How do we create and walk through the branches?
APPHIA – Crafted with Care and Precision for Academic Excellence.
3