ALEX Learning Activity

  

Algorithms and Pseudocodes

A Learning Activity is a strategy a teacher chooses to actively engage students in learning a concept or skill using a digital tool/resource.

You may save this Learning Activity to your hard drive as an .html file by selecting “File”,then “Save As” from your browser’s pull down menu. The file name extension must be .html.
  This learning activity provided by:  
Author: April Chamberlain
System:Trussville City
School:Trussville City Board Of Education
  General Activity Information  
Activity ID: 2149
Title:
Algorithms and Pseudocodes
Digital Tool/Resource:
TEDEd: "What's an algorithm?"
Web Address – URL:
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.

  Associated Standards and Objectives  
Content Standard(s):
Digital Literacy and Computer Science
DLIT (2018)
Grade: 5
3) Create an algorithm that is defined by simple pseudocode.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • create set of steps that is written in simple pseudocode.
Teacher 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
DLIT (2018)
Grade: 5
4) Create a simple pseudocode.

Unpacked Content
Evidence Of Student Attainment:
Students will:
  • create simple pseudocode.
Teacher 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.
Learning Objectives:

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

Students will create a simple pseudocode.

  Strategies, Preparations and Variations  
Phase:
During/Explore/Explain
Activity:

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:

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


Advanced 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.

Variation Tips (optional):

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

Notes or Recommendations (optional):
 
  Keywords and Search Tags  
Keywords and Search Tags: