Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
16 views5 pages

Introduction To Computing

This document contains instructions and questions for an examination on Introduction to Computing. Section A contains 10 multiple choice and true/false questions worth 10 marks. Section B contains 5 structured questions worth 50 marks, including writing pseudocode algorithms to calculate values based on conditions, convert control structures, identify program inputs/outputs, and write programs to analyze temperature data and student marks. The exam is 2 hours and covers a range of core computing concepts like variables, control structures, algorithms and pseudocode.

Uploaded by

simeon kanyome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views5 pages

Introduction To Computing

This document contains instructions and questions for an examination on Introduction to Computing. Section A contains 10 multiple choice and true/false questions worth 10 marks. Section B contains 5 structured questions worth 50 marks, including writing pseudocode algorithms to calculate values based on conditions, convert control structures, identify program inputs/outputs, and write programs to analyze temperature data and student marks. The exam is 2 hours and covers a range of core computing concepts like variables, control structures, algorithms and pseudocode.

Uploaded by

simeon kanyome
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

nAmlBIA UnlVERSITY

OF SCIEnCE Ano

FACULTY OF COMPUTING AND INFORMATICS


DEPARTMENT OF COMPUTER SCIENCE

QUALIFICATION: BACHELOR OF COMPUTER SCIENCE, BACHELOR OF INFORMATICS

QUALIFICATION CODE: 07BCMS, 07BAIT LEVEL: 5

COURSE: INTRODUCTION TO COMPUTING COURSE CODE: ICG511S

DATE: JUNE 2022 PAPER: THEORY

DURATION: 2 HOURS MARKS: 60

FIRST OPPORTUNITY EXAMINATION QUESTION PAPER

EXAMINER(S) Ms N. NASHANDI
Mr S. TJIRASO
Mr S. MUCHINENYIKA
Ms R. IIPINGE
Mr R. MUSUTUA
Mr H. KAVIMAKA

MODERATOR: Mr P. GALLERT

INSTRUCTIONS
1. Answer ALL the questions.
2. Read all the questions carefully before answering.
3. Number the answers clearly

THIS QUESTION PAPER CONSISTS OF 5 PAGES


(Including this front page)

1
SECTION A: Multiple choices and True and false Questions [10 Marks]

• Answer all the questions in the provided booklet.


• The section consists of 10 questions.

1. Which of the following statements is correct?


A. number * 6 = product

B. 'e' = vowel

C. lastName = 'Mwanawasa'

D. isPresent = "true"

E. count++

2. A string is ... ?

A. A whole number

B. Letters, numbers, or punctuation

C. A number with a decimal

D. True or False

3. What is the difference between a flowchart and pseudocode?

A. A flowchart is diagramatic whilst pseudocode is written in a programming

language (eg. Pascal or Java)

B. A flowchart is a diagrammatic description of an algorithm whilst

pseudocode is a textual description of an algorithm

C. A flowchart is textual, but pseudocode is diagrammatic

D. A flowchart and pseudocode are the same thing

4. Which type of control structure is shown in the below flowchart?

Previous
statement

No

Statement I Statement 2

A. Repetition

B. Sequential

..,
C. Selection

D. Case

5. In a flowchart, a calculation (process) is represented by __ ?

A. diamond

B. Rectangle

C. Parallelogram

D. A circle

6. Which of the following statements are correct about 6 used in the program?

int num[6];

num[6]=21;

A. In the first statement 6 specifies a particular element, whereas in the second

statement it specifies a type.

B. In the first statement 6 specifies an array size, whereas in the second

statement it specifies a particular element of array.

C. In the first statement 6 specifies a particular element, whereas in the second

statement it specifies an array size.

D. In both the statement 6 specifies array size.

7. While comparing two variables, their datatypes / format should be the same.

A. True

B. False

8. You can have an IF without an else but not an else without an IF.

A. True

B. False

9. Sequential, selection and iterative control are all based on a given condition.

A. True

B. False

10. To check multiple conditions, nested control structure can be used.

A. True

B. False

3
SECTION B: Structured Questions [50 Marks]

• Answer all the questions in the provided booklet.


• The section consists of 5 questions.

1. A pseudocode algorithm assigns values to three variables as follows:


GateOpen = FALSE

Alarm = TRUE

PowerFail = TRUE

Evaluate the expressions given in the following table:

Expression Evaluates to

Alarm OR NOT PowerFail

NOT (Alarm AND PowerFail)

(GateOpen OR Alarm) AND PowerFail

(GateOpen AND Alarm) OR NOT PowerFail

[4 marks]

2. Unnest the following nested if statement pseudocode snippets: [3 marks]

IF {subject<> /CG"} THEN


11

If (testMarks >50} THEN

Display "You are not an FCJstudent.


11

ENDIF

END/F

3. Identify the inputs, process, and outputs for a program that is required to

determine the average grade of your class. [4 Marks]

4. Convert the following case structure into a linear if statement: [ 4 Marks]


CASEOF (record_code)

'A': increment counter A

'B': increment counter B

'C': increment counter C


default: increment error counter

ENDCASE

4
5. Consider the following formula: N= X*X/(1-X). The formula is used to calculate N.

The calculation is repeated until a sentinel of X=0 is entered. Create a program that will

show the repeated calculation using pseudocode. The program should receive the

value of X. An error message should be display if 1 is entered as a value of X. The

program should then print the value of X and N. [6 marks]

6. Convert the following pseudocode into a follow chart: [12 Marks]


START

Prompt the user for the house value

Get houseValue

Prompt the user for the amountOfWaterUsed

Get amountOfWaterUsed

monthlyAmount=0

IF {house Value> 500 000} THEN

monthlyAmount= (amountOfwaterUsed*20} +{0.05*houseValue)

ELSEIF (houseValue > 300 000} AND {houseValue < 500 000} THEN

monthlyAmount= (amountOfwaterUsed*20} +{0.03*houseValue)

ELSE

monthlyAmount= (amountOfwaterUsed*20}

END IF

END IF

Display monthlyAmount

END

7. Create a program using pseudocodes which takes a temperature input over a 100-

day period (once per day) and display the number of days when the temperature was

below 20C and the number of days when the temperature was 20C and above.

[10 marks]

8. Write a program using pseudocodes algorithm that would enable the user to enter student

marks for 100 students. The program should then determine whether the mark entered is a

pass or fail given that the pass mark is 50. [8 Marks]

************ Endof the Paper***************

You might also like