You are on page 1of 14

INTRODUCTION TO PROGRAMMING

CCS10103

SEPTEMBER 2021

ASSIGNMENT 1

<photo> <photo> <photo> <photo>

<SEERTINBAN <CHOW SHAO <SHIVASHANKARA <NUR ADLINA


A/L HENG> N A/L GOPAL> BINTI HANAFI>
VIJAYENDRRAN> <012021090540> <012021091247> <012021091028>
<012021090841> <DBC> <DIT> <DCF>
<DCF>

Submission date :

Marks: REFER RUBRIC Q1 Q2 Q3 Q4


Pseudo Code

Flow Chart

TOTAL
Pseudo Code
Rubric

Criteria 2 3 4 5 Marks
Q1 Q2 Q3 Q4

Timeline Very late (1 mark) 2-3 days late (2 marks) 1 day late (3 marks) On time (5 marks)

P-code is difficult to P-code is somewhat P-code is clear, P-code is very clear,


Content understand and is understandable, but very understandable, and the understandable,
unorganized. little of the code is code is organized into readable, and
organized into functions. functions for a few organized into
of the algorithms. functions.

Code cannot be The code can be converted The code can be converted The code can be easily
converted into a program. into a program only with into a program. converted into a program.
much difficulty.

Content does not address The components of The components of The components of
the components of licensure are outlined. licensure are present and licensure are present,
licensure However, the specific developed with relevant fully developed.
details/elements need to be details/elements. Each details/element of
developed further. the flowchart is labeled.

Steps in problem solving Steps in problem solving Steps in problem solving Steps in problem solving
Language written in human written in certain of written in certain of written in programming
language. programming code and programming code and code and minimum in
many of it in human certain in human language. human language.
language.

TOTAL (25)
/100
ASSIGNMENT 1

Flow Chart
Rubric

Criteria 2 3 4 5 Marks
Q1 Q2 Q3 Q4

Timeline Very late (1 mark) 2-3 days late (2 1 day late (3 marks) On time (5 marks)
marks)

Depiction of The path to licensure The path to licensure The path to licensure The path to licensure
selected fails to match the case does not match well matches the case shows insight into the
path/ Branch study. with the case study. study. case study.

Content Content does not The components of The components of The components of licensure
address the licensure are outlined. licensure are present are present,
components of However, the specific and fully developed.
licensure details/elements need developed with Each details/element of the
to be relevant flowchart is labeled.
developed further. details/elements.

Symbol Wrong symbols are Many symbols used Some symbols used Correct symbols are used.
used. are wrong. are wrong.

Layout and A planned design or Flow chart lacks a Flow chart is neatly Flow chart is welldesigned,
organization organization of ideas logical and visual flow designed and logically
in of ideas, is logically organized, and
the flow chart is poor. disorganized, and is organized. graphically pleasing, and
Work is not difficult to interpret. demonstrates attention to
presentable. detail.

TOTAL (25)
/100
QUESTION 1

Pseudocode

START

Input num 1, num 2 and operation

If operation = Multiplication

Result = num 1 * num 2

If operation = Division

Result = num 1 / num 2

If operation = Addition

Result = num 1 + num 2

If operation = Subtraction

Result = num 1 – num 2

Output operation, result

END
Flowchart

START

Input num 1, num 2 and


operation

operation = Multiplication Result = num 1 * num 2

operation = Division Result = num 1 / num 2

operation = Addition Result = num 1 + num 2

operation = Subtraction Result = num 1 - num 2

operation = Invalid

Output operation, Result

END
Desk-check

num 1 num 2 operation Result


Multiplication 8 * 4=32
8 4 Division 8 / 4=2
Addition 8 + 4=12
Subtraction 8 – 4=4
Multiplication 20 * 2=40
20 2 Division 20 / 2=10
Addition 20 +2=22
Subtraction 20 – 2=18
QUESTION 2

Input: number of person, category, charge (RM)


Process: Symbolise each category with an alphabet
over 50= A, 13-50= B, 3-12= C, under 3=D
enter category, number of person and charge to calculate
calculate charge of A= number of person x 30.00
calculate charge of B= number of person x 40.00
calculate charge of C= number of person x 15.00
calculate charge of D= number of person x 0
Total Charge= charge of A+ charge of B+ charge of C+ charge of D
Discount= 10/100 x Total Charge
Grand Total= Total Charge- Discount
Output: Grand Total, Total Charge, Discount, category

Pseudocode

START
INPUT number of person, category, charge (RM)
charge of A= number of person x 30
charge of B= number of person x 40.00
charge of C= number of person x 15.00
charge of D= number of person x 0
Total Charge= charge of A+ charge of B+ charge of C+ charge of D
Discount= 10/100 x Total Charge
Grand Total= Total Charge- Discount
OUTPUT Grand Total, Total Charge, Discount, category
END
Flowchart

START

INPUT number of person, category, charge (RM)

charge of A= number of person x 30.00

charge of B= number of person x 40.00

charge of C= number of person x 15.00

charge of D= number of person x 0

Total Charge= charge of A+ charge of B+ charge of C+


charge of D

Discount= 10/100 x Total Charge

Grand Total= Total Charge- Discount

OUTPUT Grand Total, Total Charge, Discount, category

END
Desk-check

category number of charge (RM) Total Charge Discount Grand Total


person

over 50 1 30.00 10/100 x 180.00-


180.00= 18.00=
13- 50 3 40.00 RM180.00
RM162.00
RM18.00
3- 12 2 15.00
under 3 1 0

over 50 2 30.00 10/100 X 170.00-


170.00= 17.00=
13- 50 2 40.00 RM170.00
RM17.00 RM153.00
3- 12 2 15.00
under 3 2 0
QUESTION 3

I: total purchase (RM), discount percentage

P: if total purchase < 10.00


discount percentage = 0
calculate discount
calculate price after discount
else if 50.00>total purchase >= 10.00
discount percentage = 5
calculate discount
calculate price after discount
else if 100.00>total purchase>=50.00
discount percentage = 8
calculate discount
calculate price after discount
else if total purchase >= 100.00
discount percentage =10
calculate discount
calculate price after discount

O: total purchase (RM), discount (RM) and price after discount (RM)

Pseudocode

START
INPUT total purchase (RM) and discount percentage
If total purchase (RM) < 10.00
discount percentage = 0
discount(RM) = total purchase (RM) * 0
price after discount(RM) = total purchase (RM) – discount(RM)

else if 50.00>total purchase (RM) >= 10.00


discount percentage = 5
discount(RM) = total purchase (RM) * 5/100
price after discount = total purchase (RM) – discount(RM)

else if 100.00>total purchase (RM)>=50.00


discount percentage = 8
discount(RM) = total purchase (RM)* 8/100
price after discount(RM) = total purchase (RM) – discount(RM)

else if total purchase (RM) >= 100.00


discount percentage =10
discount(RM) = total purchase (RM) * 10/100
price after discount(RM) = total purchase (RM) – discount(RM)
OUTPUT total purchase (RM), discount(RM) and price after discount(RM)
END
Flow Chart

START

Input totaldrpurchase(RM) and discount percentage

False
True

If total purchase < 10.00 discount percentage = 0 discount(RM) = total purchase(RM) * 0

True
If 50.00>total purchase>= 10.00 discount percentage = 5 discount(RM) = total purchase(RM) * 5/100

False

True

If 100.00>total purchase>=50.00 discount percentage = 8 discount(RM) = total purchase(RM) * 8/100

False

True
total purchase>= 100.00 discount percentage = 10 discount(RM) = total purchase(RM) * 10/100

price after discount(RM)= total purchase(RM) – discount(RM)

Output total purchase(RM),


discount(RM) and price after
discount(RM)

END
Desk-check

total purchase (RM) discount percentage discount (RM) price after


discount(RM)
60 0 60*0=0 60 - 0 =60
500 10 500* 10/100=50 500 - 50 = 450
QUESTION 4

I: currency amounts and currency option


P: Pound =5.50, USD=4.42, AUD=3.39
if currency option=1, then amount money = currency amounts * Pound
if currency option =2 then amount money = currency amounts *USD
else if currency option =3 then amount money = currency amounts *AUD

O: amount money (RM)

Pseudocode

START
Input currency amounts and currency option
Pound =5.50, USD=4.42, AUD=3.39
if currency option=1, then amount money = currency amounts * 5.50
if currency option =2, then amount money = currency amounts *4.42
else if currency option =3, then amount money = currency amounts *3.39
Output amount money (RM)
END
Flowchart

Start

Input current amounts and currency option

True
if currency option = 1 Amount money = currency
amount * 5.50

False
True
if currency option = 2 Amount money = currency
amount * 4.42

False
True
if currency option = 3 Amount money = currency
amount * 3.39

Amount money (RM)

End

Desk-check

currency option currency amount amount money (RM)


1 200Pound 200*5.50=1100
2 300USD 300*4.42=1326

You might also like