ictly5 programming

Upload: halim-hassan

Post on 05-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 ICTLY5 Programming

    1/20

    1. Programming Concept2. Algorithm (Sequential)3. Algorithm (Selection IF)

    4. Flowchart (Sequential)5. Flowchart (Selection IF)

    1/3

  • 8/2/2019 ICTLY5 Programming

    2/20

    2/3

    Analisis

    Algorithm

    Semakan

    Penyelesaiaan Am

    Pengaturcaraan

    Penyelesaiaan terperinci

    Ujian

    Senggaraan

    Fasa Penyelesaian Masalah Fasa Implementasi

    ICTL

  • 8/2/2019 ICTLY5 Programming

    3/20

    Sebelum memahami algorithm perlu faham dulu konsep

    programming dengan memahami beberapa istilah.programprogrammingprogrammer

    Terdapat 2 jenis algorithm :SequentialSelection

    Algorithm mempunyai pewakilan atau dikenali sebagaipewakilan algorithm :

    1.Psuedocode

    2.Flowchart

    Selain pseducode dan flowchart anda juga perlu tahutentang sourcecode.

    3/3

  • 8/2/2019 ICTLY5 Programming

    4/20

    ICTL

    1/9

    problem

    How to solveproblem

    People who solvethe problem

  • 8/2/2019 ICTLY5 Programming

    5/20

    ICTL

    2/9

    Untuk mengadakan satu atucara, kita memerlukan seorangpengaturcara untuk membuat pengaturcaraan.

    Untuk membangunkan satu program, kita memerlukan seorangprogrammer untuk membuat programming.

    Sekolah kita akan menyambut hari guru, oleh itu kitamemerlukan seorang guru untuk membuat persediaan.

  • 8/2/2019 ICTLY5 Programming

    6/20

    General a set / list of instructions to follow

    Computer a set / list of instructions todirect the computer to do a task

    CreatingA sequenceInstructionsEnable/direct computerDo a task/activity

    Creating a sequence of instructions to enable theComputer to do something(activity or act).

    ICTL

    3/9

  • 8/2/2019 ICTLY5 Programming

    7/20

    Example of daily life

    Get Ready to school

    Batrisyia wakes up at 6.00am everyday. Then, she will

    brush her teeth cleanly. Next, she will take a bath. Once

    done, Batrisyia will put on her school uniform. She will

    have her breakfast right after that. After a nice and

    fulfilling breakfast, she will make her way to school.

    ICTL

    4/9

    Click on instructions

  • 8/2/2019 ICTLY5 Programming

    8/20

    ICTL

    5/9

    Example of daily life

    Get Ready to school

    6.00 am - wake up

    6.15 am - brush teeth

    6.20 am - take a bath

    6.30 am - wear school uniform

    6.45 am - have a breakfast

    7.00 am - go to school

  • 8/2/2019 ICTLY5 Programming

    9/20

    Making Coffee Baking a Cake

    Birthday Party Go to school Clean a Classroom Post a letter Cooking Rice

    Wuduk Solat

    Problem:A Birthday PartyHow to solve:

    1.Arrival of guest and friends2.Welcome speech3.Cutting the birthday cake4.Lucky draw and games

    Write list of instructions of one of theprograms

    ICTL

    6/9

    List some example ofprograms

  • 8/2/2019 ICTLY5 Programming

    10/20

    Program:How to solve:

    1.Get a sweets

    2.Unwrap the sweets3.Put the sweets into your mouth

    ICTL

    7/9

    Answer the questions below

    1.What are the instructions tell you to do?

    2.How many instructions are there in this program?

  • 8/2/2019 ICTLY5 Programming

    11/20

    A Set/List of Instructions

    Wash and cut the tomatoes and lettuce Add some salt, pepper, olive oil and lemon

    juice Cut the apple, cucumber and carrots into

    cubes Wash and peel the apple, cucumber and

    carrot

    Toss the ingredients before serving Put all the ingredients in the salad bowl

    1. Wash and peel the apple, cucumber and carrot

    2. Cut the apple, cucumber and carrots into cubes

    3. Wash and cut the tomatoes and lettuce

    4. Put all the ingredients in the salad bowl

    5. Add some salt, pepper, olive oil and lemon juice

    6. Toss the ingredients before serving

    ICTL

    8/9

  • 8/2/2019 ICTLY5 Programming

    12/20

    A Set/List of Instructions

    Wash and cut the tomatoes and lettuce Add some salt, pepper, olive oil and lemon

    juice Cut the apple, cucumber and carrots into

    cubes Wash and peel the apple, cucumber and

    carrot

    Toss the ingredients before serving Put all the ingredients in the salad bowl

    Programming (Creating a sequence of instructions )

    1. Wash and peel the apple, cucumber and carrot

    2. Cut the apple, cucumber and carrots into cubes3. Wash and cut the tomatoes and lettuce4. Put all the ingredients in the salad bowl5. Add some salt, pepper, olive oil and lemon juice6. Toss the ingredients before serving

    ICTL

    9/9

  • 8/2/2019 ICTLY5 Programming

    13/20

    2/3

    Analisis

    Algorithm

    Semakan

    Penyelesaiaan Am

    Pengaturcaraan

    Penyelesaiaan terperinci

    Ujian

    Senggaraan

    Fasa Penyelesaian Masalah Fasa Implementasi

    ICTL

  • 8/2/2019 ICTLY5 Programming

    14/20

    ICTL

    1/4

    A specific

    and step-by-step set of instructions

    for carrying out a procedure or solving a problem,

    usually with the requirement that the procedureterminate at some point

    2 types of algorithm representation will be explained:

    Flowchart Pseudocode

  • 8/2/2019 ICTLY5 Programming

    15/20

    A methodProcedurerecipeFor Carrying out particular task

    ICTL

    1/4

    Satu jujukan langkah demi langkah terhingga

    Digunakan untuk menyelesaikan masalah

    Seorang pengaturcara yang baik biasanya tidak cubamenyelesaikan masalah dengan terperinci di peringkatpermulaan. Biasanya kaedah rekabentuk atas-bawahdigunakan.

  • 8/2/2019 ICTLY5 Programming

    16/20

    ICTL

    1/4

    Problem: Prepare a Breakfast

    1. Start

    2. Prepare a Breakfast

    3. End

  • 8/2/2019 ICTLY5 Programming

    17/20

    ICTL

    1/4

    Problem: Prepare a Breakfast1. Start2. Prepare a Breakfast

    2.1 Prepare a tuna sandwich2.2 Prepare some chips2.3 Make a cup of coffee

    3. End

  • 8/2/2019 ICTLY5 Programming

    18/20

    ICTL

    1/4

    Problem: Prepare a Breakfast1. Start2. Prepare a Breakfast

    2.1 Prepare a tuna sandwich2.1.1 Take 2 slices of bread2.1.2 Prepare tuna paste

    2.2 Prepare some chips2.2.1 Cut potatoes into slices

    2.2.2 Fry the potatoes2.3 Make a cup of coffee

    3. End

  • 8/2/2019 ICTLY5 Programming

    19/20

    ICTL

    1/4

  • 8/2/2019 ICTLY5 Programming

    20/20

    ICTL

    1/4

    1. Student identify at least five daily activities that involvesequence or procedure. Student list down the procedures accordingly to its order.