CSC400 Milestone2 PC3.1 4.10 Stud
CSC400 Milestone2 PC3.1 4.10 Stud
CSC400 Milestone2 PC3.1 4.10 Stud
Learner Name
Grade 9
617761 NQA Registration #
ATHS ID
Qualification: Certificate 3
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.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
○ ▢ ▢ ▢ ▢
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
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.
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.
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.
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[
B. Declare a variable called ‘age’ and initialize the variable with your age.
var age = 20
Variable Variable is a named container that stores a value that can be changed
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.
Complete the activity in the Swift Playgrounds app (Checking for Equal Values) and insert your
screenshots showing your work below.
}
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.
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.
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.