Learning Resource Type

Learning Activity

Algorithms and Pseudocodes

Subject Area

Digital Literacy and Computer Science

Grade(s)

5

Overview

Students will be introduced to an algorithm that uses a simple pseudocode to quickly count the number of people in a room. Students will create a simple pseudocode.

This activity was created as a result of the DLCS COS Resource Development Summit.

    Digital Literacy and Computer Science (2018) Grade(s): 5

    DLCS18.5.3

    Create an algorithm that is defined by simple pseudocode.

    Unpacked Content

    UP:DLCS18.5.3

    Vocabulary

    • algorithm
    • pseudocode

    Knowledge

    Students know:
    • simple pseudocode resembles language used to communicate with computers.

    Skills

    Students are able to:
    • create an algorithm that is written in simple pseudocode.

    Understanding

    Students understand that:
    • an algorithm that is written in simple pseudocode is similar to an algorithm written using a programming language.
    Digital Literacy and Computer Science (2018) Grade(s): 5

    DLCS18.5.4

    Create a simple pseudocode.

    Unpacked Content

    UP:DLCS18.5.4

    Vocabulary

    • pseudocode

    Knowledge

    Students know:
    • how to write an algorithm in pseudocode.

    Skills

    Students are able to:
    • create simple pseudocode.

    Understanding

    Students understand that:
    • pseudocode is simple phrases of instruction that mimics the logic of a programming language.

    Phase

    During/Explore/Explain
    Learning Objectives

    Learning Objectives

    Students will create an algorithm that is defined by simple pseudocode.

    Students will create a simple pseudocode.

    Activity Details

    Students will:

    1. restate/review the definition of an algorithm. Algorithm - a step by step set of directions for completing a task.

    2. watch What is an Algorithm? by David J. Malan to explore a simple algorithm of counting people with a pseudocode.

    3. write the pseudocodes in their journal as they are discussed in the video.

      Pseudocode 1

    line 1 - let N = 0

    line 2 - for each person in room (loop begins)

    line 3 - Set N = N + 1

    Output =

    End.

     

    Pseudocode 2

    line 1 - let N = 0

    line 2 - for each pair in room (loop begins)

    line 3 - Set N = N + 2

    Output =

    End.

     

    Pseudocode 3

    line 1 - let N = 0

    line 2 - for each pair in room (loop begins)

    line 3 - Set N = N + 2

    line 4 - If 1 person remains then (condition)

    line 5 - Set N = N + 1

    Output =

    End.

     

    1. edit Pseudocode 3 in their journal to create algorithms that count by 5 and 10.  

    2. As a class, complete the seven THINK questions. The teacher must have a TEDEd free account to access. Project the assessment on the board for all to see or enter questions in a Google Spreadsheet for all to complete and review results.

    3. explore additional examples of pseudocodes using the examples below then create their own to share with the class.

    Examples:

    Program adding two numbers

    Input Number1

    Input Number2

    Number3 = Number1 + Number2

    Output Number 3

    End.

     

    Program get dressed

    if temperature > 75

        put_on( tshirt )

        put_on( shorts )

        put_on( sandals )

    else if temperature >60

        put_on( blue_shirt )

        put_on( blue_jeans )

        put_on( white_socks )

        put_on( sneakers )

    End.

     

    Program Make a Cup of Tea

    Organize everything together

    Plug in kettle

    Put tea bag in cup

    Put water into kettle

    Wait for kettle to boil

    Add water to cup

    Remove tea bag with spoon/fork

    Add milk and/or sugar

    Serve

    End.

    (Can you add conditions to the above program? Remember to indent)

    1. In pairs, students will discuss and record answers in their journals to the question “Who can execute an algorithm more quickly, a human or a computer? How come?” Pairs will share their discussions with the class.

    Assessment Strategies

    Assessment Strategies

    Students will be assessed on their individually written pseudocode and journal entry.

    Variation Tips

    Explore pseudocodes in everyday life and their variations using Pseudocode by Damian Gordon.

    Background and Preparation

    Background / Preparation

    Pre-watch the video What is an Algorithm?

    Projector to display questions. If a projector is not available, print or create Google form of THINK questions.

    Device for each pair if using Google form.

    Digital Tools / Resources

    ALSDE LOGO