You are on page 1of 16

Nahyan Saif Al Shehhi Code, Subject, Grade CSC400/402 Computer Science

Learner Name
Grade 9
617761 NQA Registration #
ATHS ID

Related NQC Unit and Performance Criteria:

Qualification: Certificate 3

Unit: Create Simple Programming using Different Data Structures

GC GC/PC Description Mark (tick as


appropriate)
/PC#

PC3.1 Define algorithms as a set of instructions to tell a computer precisely 1 2 3 4 5*


what steps to take to solve a problem or reach a goal ▢ ▢ ▢ ▢ ▢

PC3.2 Define Pseudo code as a way to represent algorithms before writing a 1 2 3 4 5*


computer program ○ ▢ ▢ ▢ ▢

PC3.3 Write different algorithms to solve the same problem and decide the 1 2 3 4 5*
most efficient algorithm to solve the task according to specific criteria’s
▢ ▢ ▢ ▢ ▢
that evaluate the algorithms performance

PC3.4 1 2 3 4 5*
Generalize a solution for a problem to use it to solve similar real-world
problems within the same domain ▢ ▢ ▢ ▢ ▢

PC3.5 1 2 3 4 5*
Write computer programs based on algorithms and pseudo code
▢ ▢ ▢ ▢ ▢

PC4.1 Define variables as a value that can change, depending on conditions or 1 2 3 4 5*


on information passed to the program under the Swift programming
▢ ▢ ▢ ▢ ▢
platform

PC4.2 Identify different types of variables used to store data in Swift 1 2 3 4 5*


programming platform and the way to parse data between them
○ ▢ ▢ ▢ ▢

PC4.3 Declare a variable and assign a value to it using the Swift programming 1 2 3 4 5*
platform syntax to hold a specific data within a program
▢ ▢ ▢ ▢ ▢

PC4.4 1 2 3 4 5*
Use proper descriptive naming convention to name variables so that
variables names are self-explanatory ▢ ▢ ▢ ▢ ▢

PC4.5 Declare Constants using let command in Swift Programming platform to hold a 1 2 3 4 5*
non-changing variable value
▢ ▢ ▢ ▢ ▢
PC4.6 Use the assignment operator (=) to assign an initial value to a variable that 1 2 3 4 5*
matches its defined data type
○ ▢ ▢ ▢ ▢

PC4.7 Use the assignment operator (=) to assign a new value to a variable in a 1 2 3 4 5*
program that matches its defined data type
○ ▢ ▢ ▢ ▢

PC4.8 Identify the state (Stored information in a variable) of a variable at any stage of 1 2 3 4 5*
the program in Swift programming platform
○ ▢ ▢ ▢ ▢

PC4.9 Identify the scope of the local variables in a programming as an indication of 1 2 3 4 5*


how accessible a variable is to a function or another call within the same
program ○ ▢ ▢ ▢ ▢

PC4.10 Perform arithmetic, increment, decrement, comparison between variables and 1 2 3 4 5*


logical operators to perform different operations on variables
○ ▢ ▢ ▢ ▢

 Only for First Submission

Rubric
Performance
Score Description
Criteria
Student’s work is meeting the requirements of evidence quality against the
5
criteria identified in the unit of competency, by no less than 90%.
Student’s work is meeting the requirements of evidence quality against the
Achieved 4
criteria identified in the unit of competency, by no less than 80%.
Student’s work is meeting the requirements of evidence quality against the
3
criteria identified in the unit of competency, by no less than 70%.
Student’s work is approaching towards meeting the minimum requirements
2 of the evidence quality to demonstrate competency. Work quality must be
improved to be acceptable.
1 Student submits evidence that lacks quality towards demonstrating
NOT
competency against the criteria identified in the unit of competency.
Achieved
0 No evidence of completion submitted.
Assessment writer

Name: Anju Menon Date: 14/12/2023


Signature:

Assessment verifier’s approval

Verifier’s Name: Date: 15/12/2023


Tawfiq Abdullah Signature:

Learner’s declaration

I certify that the work submitted for this assignment is my own. I have clearly referenced any sources used in
the work. I understand that false declaration is a form of malpractice.

Learner’s signature: Date: 20/1/2024

Assessor’s Feedback to the learner


3.1-Defined algorithms as a set of instructions to tell a computer precisely what steps to take to solve a
problem or reach a goal
3.2- Defined Pseudo code as a way to represent algorithms before writing a computer program
3.3- Written different algorithms to solve the same problem and decide the most efficient algorithm to solve
the task according to specific criteria’s that evaluate the algorithms performance
3.4-Generalized a solution for a problem to use it to solve similar real-world problems within the same domain
3.5- Written computer programs based on algorithms and pseudo code
4.1- Defined variables as a value that can change, depending on conditions or on information passed to the
program under the Swift programming platform
4.2- Identified different types of variables used to store data in Swift programming platform and the way to
parse data between them
4.3- Declared a variable and assign a value to it using the Swift programming platform syntax to hold a specific
data within a program
4.4- Used proper descriptive naming convention to name variables so that variables names are self-explanatory
4.5- Declared Constants using let command in Swift Programming platform to hold a non-changing variable value
4.6- Used the assignment operator (=) to assign an initial value to a variable that matches its defined data type
4.7- Used the assignment operator (=) to assign a new value to a variable in a program that matches its defined data type
4.8- Identified the state (Stored information in a variable) of a variable at any stage of the program in Swift programming
platform
4.9- Identified the scope of the local variables in a programming as an indication of how accessible a variable is to a
function or another call within the same program
4.10- Performed arithmetic, increment, decrement, comparison between variables and logical operators to perform
different operations on variables

Learner’s Feedback about assessment decision


Assessor’s approval

Assessor’s (Teacher) Name: Signature: Date: 22/1/24

Notes:

 The instructor has the right to change or modify the assessment questions as long as he/she
is fulfilling the specification of the listed Performance Criteria.
 If the instructor changes the questions, they have to be verified by an assessor.
 When uploading the assessments to your ePortfolio, please follow the evidence naming
convention
Question 1:

Define an algorithm.

An algorithm is a set of rules and instructions you use.

[This provides evidence for PC 3.1]

Question 2:

Define a pseudocode.

Pseudocode is a type of simplified programming language that uses English-like statements to describe
an algorithm's steps. It is not a real programming language, but it helps the programmer plan out their
program before they actually begin coding.

[This provides evidence for PC 3.2]


Question 3: Practical Task

A. Write an algorithm to find the largest number in a given set.


B. Convert the algorithm in the above question to the pseudocode.

Question 3.A (Algorithm)


1. Set the current largest number as the first number in the set.
2. Loop through the remaining numbers in the set, comparing each to the existing largest number.
3. If any number is larger than the current largest number, set it as the new largest number.
4. After the loop ends, the largest number will be the answer.

Question 3.B (pseudocode)

o Set x = first number


o For each number in set
o If x is less than the current number
I. Set x = current number
[This provides evidence for PC 3.3 and 3.4]
Question 4: Practical Task

Complete the below sessions under Algorithms on Swift Playgrounds Learn to Code2, Provide screenshots of
your program with the output screens as evidence.
]This provides evidence for PC 3.5[

Screenshot 1 : The Right-Hand Rule


Screenshot 2 : Adjusting Your Algorithm
Question 5: Practical Task
A. How do you define a variable in Swift Playgrounds? Discuss with relevant examples

Variable is a named container a value that can be changed


Example:
Var MyAge = 20

B. Declare a variable called ‘age’ and initialize the variable with your age.

var age = 20

[This provides evidence for PC 4.1]

Question 6: Complete the table below by describing each word

Variable Variable is a named container that stores a value that can be changed

Initialization An action that initializes with a value during variable declaration

Data Type A data type, is a classification that specifies which type of value a variable has

Int The
inte
ger
data
type
repr
esen
ts a
posi
tive
whol
e
num
ber
or
its
nega
tive
valu
e.
Exa
mple
s of
inte
gers
are
Q, 1,
2, 3
and
4.
Bool The
Bool
ean
(som
etim
es
shor
tene
d to
Bool
) is a
data
type
that
has
one
of
two
poss
ible
valu
es
(usu
ally
deno
ted
true
and
false
)
String Strin
gs
are
used
for
stari
ng
text/
char
acte
rs.
For
exa
mple
,
"Hell
o
Worl
d" is
a
strin
g of
char
acte
rs.

]This provides evidence for PC 4.2[

Question 7: Practical Task


Complete the below sessions under variables on Swift Playgrounds Learn to Code2, Provide screenshots of
your program with the output screens as evidence.

Screenshot 1 : Keeping Track


Screenshot 2 : Bump up the value

Screenshot 3 : Incrementing the value


Screenshot 4 : Seeking Seven Gems

Screenshot 5: Three Gems , Four Switche

Screenshot 6: Checking for Equal Values

Screenshot 7: Round Up the Switches


Screenshot 8 : Collect the Total

[This provides evidence for PC 4.3 and 4.4]


Question 8

Complete the activity in the Swift Playgrounds app (Checking for Equal Values) and insert your
screenshots showing your work below.

[This provides evidence for PC 4.5, 4.6, 4.7, 4.10]

Screenshot of checking for Equal Values

let switchCounter = numberOfSwitches


var gemCounter = 0
while gemCounter < switchCounter {
if isOnGem {
collectGem()
gemCounter = gemCounter + 1

}
if isBlocked {
turnRight()
}
moveForward()
}
Question 9

Explain state (Stored information in a variable) of a variable at any stage of the program in
Swift programming platform.

[This provides evidence for PC 4.8]

Answer:

1. Function Scope:
o Local variables are typically declared inside a function or a block of code.
o They are accessible only within the function or block where they are
defined.
o Outside of this function or block, the variable is not visible.

Question 10

Explain the scope of the local variables in a program as an indication of how accessible a variable
is to a function or another call within the same program.

[This provides evidence for PC 4.9]

Answer:

1. Block Scope:
o In languages with block-level scope (e.g., C, C++, JavaScript), local
variables are limited to the block in which they are declared.
o For instance, if a variable is declared within an if-statement or a loop, its
scope is confined to that specific block.

You might also like