ALEX Classroom Resource

  

Computer Science Principles Unit 5 Chapter 2 Lesson 15: Processing Arrays

  Classroom Resource Information  

Title:

Computer Science Principles Unit 5 Chapter 2 Lesson 15: Processing Arrays

URL:

https://curriculum.code.org/csp-18/unit5/15/

Content Source:

Code.org
Type: Lesson/Unit Plan

Overview:

This lesson will probably take two days to complete. It introduces students to algorithms that process lists of data. The students will do two unplugged activities related to algorithms and program some of them themselves in App Lab. The for loop is re-introduced to implement these algorithms because it’s straightforward to use to process all the elements of a list. The lesson begins with an unplugged activity in which students write an algorithm to find the minimum value in a hand of cards. Students then move to Code Studio to write programs that use loops and arrays. Students are shown how to use a for loop to visit every element in an array. Students use this pattern to process an array in increasingly complex ways. At the end of the progression, students will write functions which process arrays to find or alter information, including finding the minimum value - a problem they worked on in the unplugged activity. Finally, an unplugged activity has students reason about linear vs. binary search and attempt to write pseudocode for a binary search.

Students will be able to:
- use a for loop in a program to implement an algorithm that processes all elements of an array.
- write code that implements a linear search on an unsorted array of numbers.
- write code to find the minimum value in an unsorted list of numbers.
- explain how binary search is more efficient than linear search but can only be used on sorted lists.

Note: You will need to create a free account on code.org before you can view this resource.

Content Standard(s):
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
7) Compare and contrast fundamental data structures and their uses.

Examples: Strings, lists, arrays, stacks, queues.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • compare and contrast fundamental data structures and their uses.
Teacher Vocabulary:
  • data structures
  • arrays
  • stacks
  • queues
  • list
  • strings
Knowledge:
Students know:
  • when to include varying types of data structures into a program to achieve a desired result.
Skills:
Students are able to:
  • compare and contrast fundamental data structures and their uses.
  • properly use varying types of data structures in a program to achieve a desired result.
Understanding:
Students understand that:
  • data structures organize data for ease of recall.
  • data structures differ by organization structure and purpose.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
8) Demonstrate code reuse by creating programming solutions using libraries and Application Programming Interfaces.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • create code that includes commands and programs found in coding libraries or APIs.
Teacher Vocabulary:
  • code
  • programming languages
  • Application Programming Interfaces
Knowledge:
Students know:
  • how to design a programming application that reuses code from programming libraries and code created in previous applications.
Skills:
Students are able to:
  • reuse code from previous applications, code libraries, or APIs to reduce coding workload.
Understanding:
Students understand that:
  • reuse of code can be time
  • saving.
  • code may be written and shared in code libraries or may be accessible as an API.
Tags: algorithms, app lab, array, binary search, data, element, for loop, linear search, program, pseudocode, unplugged
License Type: Custom Permission Type
See Terms: https://code.org/tos
For full descriptions of license types and a guide to usage, visit :
https://creativecommons.org/licenses
Accessibility
Comments
  This resource provided by:  
Author: Aimee Bates