Get premium membership and access revision papers, questions with answers as well as video lessons.

Introduction To Programming (Dbit 121) (Dcis 110)  Question Paper

Introduction To Programming (Dbit 121) (Dcis 110)  

Course:Computer Science & Business Information

Institution: Kenya Methodist University question papers

Exam Year:2012



TIME : 3 HOURS

Instructions:
Answer question one (compulsory) in section A ''and any other two Questions in section B.
SECTION A
Question One
Define the following terms.
(4 marks)
Array
Function
Algorithm
Programming language
Differentiate between a variable and a constant.
(2 marks)
List three control structures of:
(6 marks)
Selection structure
Repetition structure
What are the general rules for flow charts?
(5 marks)
Express an algorithm to get two numbers from the user (dividend and divisor), and to test to make sure that the divisor number is not zero and displaying their quotient using a flow chart.
(13 marks)

SECTION B
Question Two
List the six steps involved in the program development life cycle.
(6 marks)
Write a program that prompts the user for the current age, and another year. It then calculates the age that the user was or will be in the second year entered.
(14 marks)

Question Three
Define the following terms
(5 marks)
Source code
Compiler
Data type
Variable
Char
Describe the three types of identifiers.
(6 marks)
Write a program to display both your names.
(9 marks)

Question Four
Write a program to represent the following
Prompt the user for a score and output as follows.
Score between 0-50, output "You are a failure- You must study much harder."
Score less than 60; output "You have just scraped through the test."
Score less than 80, output "You have done quite well."
Score equal or less than 100, output "Your score is excellent – well done."
Score not between 0-100, output "Incorrect score – must be between 0 and 100."
Draw a flow chart to outline the algorithm for a person who is ordering food at a fast food restaurant. At the food counter, the person can either order or not order the following items: a burger, fries and a drink. After placing her order, the person then goes to the cashier.
(10 marks)






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers