STUDENT NAME: ………………………………………….......
SUBJECT: COMPUTER SCIENCE IGCSE TEST Programming
Concepts 1.
DURATION: 30 MINUTES
INSTRUCTIONS
Answer all questions on the spaces provided..
The total mark for this paper is 30
All questions carry marks as indicated
1. Distinguish between the variable and constant in programming.
.............................................................................................................................................................
.............................................................................................................................................................
........................................................................................................................................................[2]
2. Type a programming statement that stores data in a variable or constant.
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………………………………………………………………………………………………....[2]
3. Tick one or more boxes in each of the row to identify whether each statement refers to variables
and or constants. [5]
Statement Variable Constant
It has a memory location
You can change its value
when the program is program
is running
It stores a piece of data
You can not change the value
when the program is running
It has an identifier
4. Write a pseudocode statement to assign the word “house” to a variable named Vtc. [1]
……………………………………………………………………………………………………
……………………………………………………………………………………………………
5. The variables P and Q are used to store data in a program. P stores a string. Q stores a character.
Write a pseudocode statements to declare variables P and Q, store “The world” in P and store
“W” in Q
…………………………………………………………………………………………………….
……………………………………………………………………………………….....................
....................................................................................................................................................[2]
6. Describe, giving example for each, the following data types used in programming.
Integer
Description………………………………………………………………………………………
…………………………………………………………………………………………………….
Example…………………………………………………………………………………………...
String
Description………………………………………………………………………………………
………………………………………………………………………………………………….....
Example…………………………………………………………………………………………..
Boolean
Description…………………………………………………………………………………………
…………………………………………………………………………………………………….....
Example…………………………………………………………………………………………[6]
7. Write a program to take two numbers as an input and adding them together.
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
…………………………………………………………………………………………………[2]
8. A program will be written to store information about members of a swimming club. The
following membership details will be recorded:
Name
Gender
Status:
Senior
Junior
Fee
Team member (Yes or No)
(i) Choose a suitable data type for each of the membership details to be recorded. [5]
Membership Details Data Type
Name
Gender
Status
Fee
Team member