BSD 1208  COMPUTATIONAL THINKING THEORY.

UNIVERSITY EXAMINATIONS: 2020/2021
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
SOFTWARE DEVELOPMENT
BSD 1208: COMPUTATIONAL THINKING THEORY
FULL-TIME
ORDINARY EXAMINATION
DATE: DECEMBER, 2021 TIME: 2 HOURS
INSTRUCTIONS: Question ONE IS COMPULSORY, Choose TWO OTHER Questions

QUESTION ONE (20 marks) Compulsory
a) Explain the following terminologies as used in algorithms.
i). Definiteness (1 mk)
ii). Sequential (1 mk)
b) Build a truth table for the proposition P ∨¬(P ∧Q) (5 mks )
c) Explain three principles of Computational Thinking (6 mks)
d) Write a simple Expert System using a programming language of your own choice. Ensure
that the systems has the following. (7 mks)
i). A knowledge bases with a least one fact with an arity of one, two and three
ii). At least one Rule
iii). A Query with the expected result from the system
QUESTION TW0 (15 marks)
a) Explain the two A’s of Computational Thinking (2 mks)
b) Draw a table of the five operators by names, their symbols and an example in each case as used
in problem solving (5 mks)
c) Explain the following terminologies as used in Computational Thinking
i). Coding (2 mks)
ii). Problem Solving (2 mks)
iii). Algorithm (2 mks)
d) Distinguish between parameters and arguments as used in problem solving (2 mks)
QESTION THREE (15 marks)
a) Illustrate the truth table of conjunction as used in Computational Thinking (5 mks)
b) Discuss two ways of controlling algorithm execution (4 mks)
c) Write a program that prompts the user to enter arbitrary five subjects through the keyboard
and calculate the total of numbers and average on the console screen. (6 mks)
QUESTION FOUR (15 marks)
a) A network of Friend can be represented in a conceptual graph. Study the vertices and the
edges given below to answer the questions that follows:
V : ={ 1, 2, 3, 4, 5, 6}
E : ={{1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}}
i). Draw a graph data structure to represent the friendship network (4mks)
ii). Identify the most influential friend in the network created in a(ii) (1 mk)
iii). Identify the least influential friend in the network created in a(ii) (1 mk)
b) Outline any three axes of computational thinking (3 mks)
c) Write an algorithm to calculate the area and the perimeter of a rectangle using both
Pseudocode and flowchart ` (6 mks)

(Visited 207 times, 2 visits today)
Share this:

Written by