Professional Documents
Culture Documents
PastPaper AnswerKey
PastPaper AnswerKey
Section A (Objective)
Q 1. For each question below there are four options A, B, C, and D. Circle the best Option.
[6]
(a) GPIO to
A connect sensors, LEDs, Motors
B connect Audio devices only
C connect Keyboard, Mouse and peripherals
D connect monitor
(b) Rasbian is
A An Operating system
B An Application Software
C Graphic Software
D Utility Software
(c) Python can run on
A Mac
B Windows
C Unix
D All of the above
(d) Which statement is a programming conditional statement that, if proved true,
performs a function or displays information?
A If Statement
B Else Statement
C Loop
D None of the above
(e) To execute the program in Visual Basic we use
A F5
B F3
C Ctrl+C
D F2
(f)
If the user enter value 5 in number value what would be the output?
A Congratulations! You win
Q 2. For each question below there are two options True and False. Circle the correct
answer. [7]
(b) Private variables are variables that are accessible only to a certain part of the
program or code.
(d) Function is a type of procedure that returns a value that is passed on to the main
procedure to finish execution.
(e) A servo motor is an electrical device that can push or rotate an object with great
precision.
(g) Python is a high-level programming language designed to be easy to read and simple
to implement
Section B (Subjective)
(a) The user interface is the graphical layout of an application. A good interface makes it
easy for users to tell the computer.
Explain any three characteristics of a good Interface. [3]
Any Three
Clear
A clear interface helps prevent user errors, makes important information obvious, and
contributes to ease of learning and use.
Consistent
A clear interface helps prevent user errors, makes important information obvious, and
contributes to ease of learning and use.
Simple
The best interface designs are simple. Simple designs are easy to learn and to use and
give the interface a consistent look.
Direct
Users must see the visible cause-and-effect relationship between the actions they take and
the objects on the screen.
Responsive
Responsive also means the interface provides some form of feedback
Attractive
Every visual element that appears on the screen potentially competes for the user’s
attention.
It is used as a standard Windows Button. In most cases, the Button Control is used to generate
a click event.
It is used to display some informative text on the GUI which is not changed during runtime.
It is used to accept textual input from the user. The user can add strings, numerical values and
a combination of those.
Radio Button is one of the popular ways of limiting the user to pick just one option.
Q 5.
(a) The Raspberry Pi, a single-board computer (SBC), is a small credit card-sized
computing device that can be used for various purposes.
Describe Raspberry Pi Architecture. [3]
Q.5 (b) What is the role of logical operators in the conditional statement? Write down any 2
conditional statements using logical operators. [ _ /3]
Logical operators are used in conditional statements to evaluate multiple conditions and
determine whether a particular block of code should be executed. There are three main
logical operators in Visual Basic:
Example 1
Example 2
Q.5 (c) Look at the picture below and label any three components [ __ /3]
A
E H
F G
Q.6 (a) Ali installed LEDs using Raspberry Pi but it keeps on burning out. Why
do you think this was happening? [ __ /3]
It is happening because of the resistors. The resistor is a passive device that
controls or resists the flow of current to your device, for example if we don’t
use the resistor in the above experiment, the LED may allow too much current
to flow which can damage
both the LED and the Pi.
1 mark for resister (root cause of burnt)
2 marks for explanation
(b) The circuitry of LED blink is pretty simple, you just have to connect the electronic
component with raspberry pi properly as shown in the picture. Please mention the
names of the components attached. Write down the two features of GPIO pins in
Raspberry Pi. [3]
Four Components
(a) 1 breadboard
(b) 1 LED
(c) 2 jumper wires
(d) 1 resistor: 220Ω/1KΩ
Any Two-point
(c) Rabian is an Operating System for Raspberry Pi. Write down the three
responsibilities of an operating system in a Raspberry Pi? [3]
Please explain what is going to happen when the above code is executed. [3]
Used the conditional statements in while loop. According to the if condition, if the voltage is
detected on the GPIO18, then the Pi will turn on the LED, which is connected to GPIO23. The
voltages will be detected on GPIO18 when the button is pressed.