GHANA CHRISTIAN UNIVERSITY COLLEGE
SCHOOL OF SCIENCE AND TECHNOLOGY
END OF 2nd SEMESTER EXAMINATIONS -2023/2024
HND GEOINFORMATION – LEVEL 100
INTRODUCTION TO PROGRAMMING II
COURSE CODE: GEE 112 DURATION:2 HOURS
ANSWER ALL QUESTIONS
SECTION A
Hardware and Software
1. What is a program? 2 Marks
2. What is hardware? 2 Marks
3. List the five major components of a computer system. 5 Marks
4. What part of the computer actually runs programs? 2 Marks
5. What part of the computer serves as a work area to store a program and its data while the
program is running? 2 marks
6. What part of the computer holds data for long periods of time, even when there is no power
to the computer? 2 Marks
7. What part of the computer collects data from people and from other devices? 2 Marks
8. What part of the computer formats and presents data for people or other devices? 2 Marks
9. What fundamental set of programs control the internal operations of the computer’s
hardware? 2 Marks
10. What do you call a program that performs a specialized task, such as a virus scanner, a
file compression program, or a data backup program? 2 Marks
11. Word processing programs, spreadsheet programs, email programs, web browsers, and
game programs belong to what category of software? 2 Marks
1
SECTION B
How a Program Works
1. A CPU understands instructions that are written only in what language? 2 Marks
2. A program has to be copied into what type of memory each time the CPU executes it?
2 Marks
3. When a CPU executes the instructions in a program, it is engaged in what process?
2 Marks
4. What is assembly language? 2 Marks
5. What type of programming language allows you to create powerful and complex programs
without knowing how the CPU works? 2 Marks
6. Each language has a set of rules that must be strictly followed when writing a program.
What is this set of rules called? 2 Marks
7. What do you call a program that translates a high-level language program into a separate
machine language program? 2 Marks
8. What do you call a program that both translates and executes the instructions in a high-
level language program? 2 Marks
9. What type of mistake is usually caused by a misspelled key word, a missing punctuation
character, or the incorrect use of an operator? 2 Marks
10. The statements that a programmer writes in a high-level language are called? 2 Marks
2
SECTION C
ANSWER QUESTION 1 AND ANY ONE FROM QUESTION 2 AND 3
1. Given the following assignment: 2 Marks each
x=2
Indicate what each of the following Python statements would print.
(a) print("x") (b) print(’x’) (c) print(x) (d) print("x + 1") (e) print(’x’ + 1)
(f) print(x + 1) (g) print (2) (h) print (2 + 1) (i) print (x - 1) (j) print ("2 + 1")
35 Marks each
2. Consider the following program that attempts to compute the circumference of a circle
given the radius entered by the user. Given a circle’s radius, r, the circle’s circumference, C is
given by the formula:
C = 2pr
3. You have been tasked with the challenge of making a simple calculator to add numbers by
requesting user input of the numbers. Write a simple program on that.