Computer Science Discoveries Unit 3 Chapter 2 Lesson 19: Functions (18-19)

Learning Resource Type

Classroom Resource

Subject Area

Digital Literacy and Computer Science

Grade(s)

6, 7, 8

Overview

This lesson covers functions as a way to organize code, make it more readable, and remove repeated blocks of code. The class learns that higher level or more abstract steps make it easier to understand and reason about steps, then begins to create functions in Game Lab. At the end of the lesson, the class uses these skills to organize and add functionality to the final version of their side scroller game.

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): 6

DLCS18.6.2

Define a process as a function.

UP:DLCS18.6.2

Vocabulary

  • process
  • function

Knowledge

Students know:
  • that often people seek to simplify processes; rather than listing all of the steps needed to take a shower, one simply uses the function "shower".

Skills

Students are able to:
  • combine or join steps such as algorithms to create a function.

Understanding

Students understand that:
    it is simpler and less confusing to identify processes rather than steps.
Digital Literacy and Computer Science (2018) Grade(s): 6

DLCS18.6.21

Identify varying data structures/systems and methods of classification, including decimal and binary.

UP:DLCS18.6.21

Vocabulary

  • data structures
  • decimal
  • binary

Knowledge

Students know:
  • how to recognize a binary number system including bits and bytes.

Skills

Students are able to:
  • identify how binary can be used for bit representation in pixels.

Understanding

Students understand that:
  • there are several data structures and methods for classification.
Digital Literacy and Computer Science (2018) Grade(s): 6

DLCS18.6.5

Identify algorithms that make use of sequencing, selection or iteration.

UP:DLCS18.6.5

Vocabulary

algorithm sequence selection iteration

Knowledge

Students know:
  • differences between the three basic programming structures.

Skills

Students are able to:
  • explain the differences in sequencing, selection, and iteration.

Understanding

Students understand that:
  • differences exist in sequencing, selection, and iteration.
Digital Literacy and Computer Science (2018) Grade(s): 7

DLCS18.7.1

Create a function to simplify a task.

UP:DLCS18.7.1

Knowledge

Students know:
  • an algorithm is the set of commands to complete a task.

Skills

Students are able to:
  • combine several algorithms or tasks as a named function.

Understanding

Students understand that:
  • it is more efficient to label an activity or program as a function than to list all of the individual steps or algorithms that make up the function or activity.
Digital Literacy and Computer Science (2018) Grade(s): 7

DLCS18.7.4

Design a complex algorithm that contains sequencing, selection or iteration.

UP:DLCS18.7.4

Vocabulary

  • algorithm
  • sequence
  • selection
  • iteration

Knowledge

Students know:
  • how to use the programming structures to design complex algorithms that make use of all three programming structures sequencing, selections, and iterations.

Skills

Students are able to:
  • design complex algorithms using the various programming structures found in algorithms.

Understanding

Students understand that:
  • complex algorithms contain sequencing, selections, and iterations.
Digital Literacy and Computer Science (2018) Grade(s): 7

DLCS18.7.5

Solve a complex problem using computational thinking.

UP:DLCS18.7.5

Vocabulary

  • computational thinking

Knowledge

Students know:
  • smaller tasks are easier to solve than complex problems.
  • that trends in data can also speed up the problem-solving process.

Skills

Students are able to:
  • abstract portions of the problem and focus on smaller tasks to aid in solving a complex problem.

Understanding

Students understand that:
  • complex problems can be overwhelming.
  • by decomposing the complex problem into simpler problems, a solution is easier to reach.
Digital Literacy and Computer Science (2018) Grade(s): 8

DLCS18.8.1

Design a function using a programming language that demonstrates abstraction.

UP:DLCS18.8.1

Vocabulary

  • function
  • abstraction

Knowledge

Students know:
  • that a function can be called into a programming while abstracting out the details contained within the function.

Skills

Students are able to:
  • create a function that can be called into a programming while leaving out the details contained within the function.

Understanding

Students understand that:
  • abstraction is a way of hiding the details of a complex function and being able to quickly make use of the complexity that has been hidden abstraction by calling in the function.
Digital Literacy and Computer Science (2018) Grade(s): 8

DLCS18.8.5

Discuss the efficiency of an algorithm or technology used to solve complex problems.

UP:DLCS18.8.5

Knowledge

Students know:
  • that many solutions exist to solve a problem.

Skills

Students are able to:
  • communicate their opinion on the efficiency of problem solving methods.

Understanding

Students understand that:
  • while many solutions exist for a problem, some are better suited to meet specific needs, such as efficiency.
Digital Literacy and Computer Science (2018) Grade(s): 8

DLCS18.8.7

Create a program that includes selection, iteration, or abstraction, and initializes, and updates, at least two variables.

UP:DLCS18.8.7

Vocabulary

  • selection
  • iteration
  • abstraction
  • initialize
  • variables

Knowledge

Students know:
  • how to write a program that includes selection, iteration, abstraction, initialization, and updates variables.

Skills

Students are able to:
  • write a program that includes foundational programming concepts
  • selection, iteration, abstraction, initialization, and updating variables.

Understanding

Students understand that:
  • they have the ability to create and design programs they may have never considered themselves able to do so.

CR Resource Type

Lesson/Unit Plan

Resource Provider

Code.org

License Type

Custom
ALSDE LOGO