Jasmine Telah Tanda
Jasmine Telah Tanda
SEMESTER 1
Explain the concept and fundamental of programming languages to solve problems in program
design [CLO1][C2][PLO1] / Terangkan konsep dan asas bahasa pengaturcaraan untuk
menyelesaikan masalah dalam reka bentuk program [CLO1] [C2] [PLO1]
100
NOTE / CATATAN:
Disediakan Oleh :
............................................................................ ..........................................................................
(STUDENT'S SIGNATURE / TANDATANGAN PELAJAR) (LECTURER 'S SIGNATURE / TANDATANGAN PENSYARAH)
Name / Nama : Name / Nama :
Date / Tarikh: Date / Tarikh:
Checked by / Disemak Oleh :
..................................................................................
( KP'S / TP’S SIGNATURE TANDATANGAN KP/TPA)
Name / Nama :
Date / Tarikh :
10 marks
10 markah
siri arahan-arahan terancang yang siri suruhan yang mengarahkan satu ciptaan set perintah atau
mengarahkan satu komputer komputer melaksanakan tugas. arahan yang mengarahkan
membuat persembahan tugas- komputer dalam melaksanakan satu
tugas. Tanpa program, komputer tugas.
tidak berguna.
6 marks
6 markah
4 marks
4 markah
5. Program Design’s Phase in Programming Life Cycle is a framework or flow that shows the steps
in problem solving. Two methods that used to design a program are pseudo code and flowchart.
Explain THREE (3) differences between pseudo code and flowchart.
Fasa Rekabentuk Aturcara dalm Kitar Hayat Pengaturcaraan adalah merupakan satu rangka
kerja atau aliran yang menunjukkan langkah-langkah penyelesaian. Dua reka bentuk tersebut
adalah pseudo code dan carta alir. Berikan TIGA (3) perbezaan di antara pseudocode dan carta
alir.
12 marks
12 markah
6. Describe the different type of structure in algorithm:
Huraikan perbezaan jenis struktur dalam algoritma:
6 marks
6 markah
Symbols Function
Simbol Fungsi
MULA / TAMAT
PROSES
Indicates operation
PILIHAN
Execute decision based on condition and the
program flow
ALIRAN
Indicates the direction of data flow
PENYAMBUNG
Show the continuining flowchart
INPUT / OUTPUT
18 marks
18 markah
This program calculates the price of an item after a 5% discount. The user will key in the price of the
item. The program will calculate and display the price after discount.
Aturcara ini mengira harga barangan selepas diskaun 5%. Pengguna akan memasukkan harga
barangan. Aturcara akan mengira dan memaparkan harga selepas diskaun
6 marks
6 markah
START
Input priceItem1, priceItem2 totalPrice= priceItem1 +
priceItem2 discount=0.2 X totalPrice
nettPrice=totalPrice-discount Output nettPrice
END
JABATAN PENDIDIKAN POLITEKNIK & KOLEJ KOMUNITI
5
SIJIL TEKNOLOGI MAKLUMAT
SEMESTER 1
12 marks
12 markah
10. Write a pseudo code to calculate BMI (body mass index) of a person. Based on the pseudo
code, create a flow chart. (BMI = kg/m2 where kg is a person's weight in kilograms and m istheir
height in metres).
Hasilkan satu kod pseudo untuk mengira BMI (body mass index) seseorang. Berdasarkan kod
pseudo tersebut, hasilkan sebuah carta alir. (BMI = kg/m2 yang mana kg ialah berat dalam
kilogram manakala m ialah tinggi dalam meter).
PSEUDO
Input tinggi
Input berat
Proses kg/m2*m
Output BMI
END
20 marks
20 markah