Learning Resource Type

Classroom Resource

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

Subject Area

Digital Literacy and Computer Science

Grade(s)

9, 10, 11, 12

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.

    Digital Literacy and Computer Science (2018) Grade(s): 09-12

    DLCS18.HS.7

    Compare and contrast fundamental data structures and their uses.

    Unpacked Content

    UP:DLCS18.HS.7

    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 (2018) Grade(s): 09-12

    DLCS18.HS.8

    Demonstrate code reuse by creating programming solutions using libraries and Application Programming Interfaces.

    Unpacked Content

    UP:DLCS18.HS.8

    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.
    Link to Resource

    CR Resource Type

    Lesson/Unit Plan

    Resource Provider

    Code.org
    Accessibility
    License

    License Type

    Custom
    ALSDE LOGO