ALEX Classroom Resource

  

Computer Science Principles Unit 3 Chapter 1 Lesson 3: Creativity in Algorithms

  Classroom Resource Information  

Title:

Computer Science Principles Unit 3 Chapter 1 Lesson 3: Creativity in Algorithms

URL:

https://curriculum.code.org/csp-18/unit3/3/

Content Source:

Code.org
Type: Lesson/Unit Plan

Overview:

This is the third of three lessons that make the connection between programming and algorithms. In this lesson, students continue to work with the "Human Machine Language" to get creative designing more algorithms for playing cards. One command is added to the language from the previous lesson (SWAP) that allows positions of cards to change. With the addition of swap, the challenge is to design an algorithm that will move the minimum card to the front of the list while keeping the relative order of all the other cards the same. If that is achieved some other Human Machine Language challenges are available.

Students will be able to:
- develop an algorithm to solve a new problem with playing cards.
- express an algorithm in the Human Machine Language.
- identify Sequencing, Selection, and Iteration in a program written the Human Machine Language.
- describe the properties of the Human Machine Language that make it a "low level" language.

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
3) Differentiate between a generalized expression of an algorithm in pseudocode and its concrete implementation in a programming language.

a. Explain that some algorithms do not lead to exact solutions in a reasonable amount of time and thus approximations are acceptable.

b. Compare and contrast the difference between specific control structures such as sequential statements, conditional, iteration, and explain the benefits and drawbacks of choices made.

Examples: Tradeoffs involving implementation, readability, and program performance.

c. Distinguish when a problem solution requires decisions to be made among alternatives, such as selection constructs, or when a solution needs to be iteratively processed to arrive at a result, such as iterative 'loop' constructs or recursion.

d. Evaluate and select algorithms based on performance, reusability, and ease of implementation.

e. Explain how more than one algorithm may solve the same problem and yet be characterized with different priorities.

Examples: All self-driving cars have a common goal of taking a passenger to a designation but may have different priorities such as safety, speed, or conservation; web search engines have their own algorithms for search with their own priorities.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • compare and contrast pseudocode and programming language.
  • be given pseudocode and code in a programming language to differentiate between the two processes.
a.
  • explain that some solutions cannot be reached in an acceptable timeframe, and therefore solutions must be approximated.
b.
  • identify sequential statements in code.
  • identify conditional statements in code.
  • identify iterations in code.
  • compare and contrast the difference between these types of control structures: sequential statements, conditional statements, and iteration.
  • identify trade-offs associated with using one control structure over another.
c.
  • identify when an iterative loop is needed in a program.
  • identify when selection constructs are needed in a program.
  • identify when recursion is needed in a program.
  • distinguish when a solution requires decisions to be made among alternatives such as an iterative loop, selection constructs, or recursion.
d.
  • evaluate algorithms based on performance.
  • evaluate algorithms based on reusability.
  • evaluate algorithms based on ease of implementation.
  • select the best algorithm based on desired strength: performance, reusability, or ease of implementation.
  • e.
    • explain that algorithms can be designed to operate for a specific priority.
Teacher Vocabulary:
  • pseudocode
  • programming language
a.
  • approximated
b.
  • iteration
  • conditional statements
  • control structures
c.
  • iterative loop
  • selection constructs
  • recursion
Knowledge:
Students know:
  • that differences exist in pseudocode and a programming language.
  • that programming languages have certain requirements for language and syntax.
a.
  • that some programs cannot return a result in a reasonable time frame, therefore approximations must be allowed in those cases.
b.
  • how to identify sequential statements, conditional statements, and/or iterations in code.
  • the differences between sequential statements, conditional statements, and/or iterations.
  • trade-offs exist with using one control structure over another.
c.
  • some decisions in a program will require the use of iterative loops, selection constructs, or recursion.
d.
  • programs can be written to satisfy a number of needs such as performance, reusability, and ease of implementation.
  • that most times, algorithms will differ based on the need of the program; performance, reusability, or ease of implementation.
e.
  • that programs can be written with specific priorities in mind.
  • that there are multiple correct ways to write a program.
  • that solutions are often chosen to meet the priority need of the program.
Skills:
Students are able to:
  • distinguish between a generalized expression of an algorithm in pseudocode and its concrete implementation in a programming language.
  • point out similarities in vocabulary and syntax between pseudocode and an algorithm.
  • point out differences in vocabulary and syntax between pseudocode and an algorithm.
a.
  • explain that some algorithms do not lead to exact solutions in a reasonable amount of time and thus approximations are acceptable.
b.
  • identify sequential statements, conditional statements, and/or iterations in code.
  • identify tradeoffs associated with using one control structure over another.
c.
  • distinguish when a problem solution requires decisions to be made among alternatives or when a solution needs to be iteratively processed to arrive at a result.
d.
  • evaluate and select algorithms based on performance, reusability, and ease of implementation.
e.
  • explain how more than one algorithm may solve the same problem and yet be characterized with different priorities.
Understanding:
Students understand that:
  • similarities and differences exist in pseudocode and programming code.
  • some programming languages more closely resemble pseudocode than do other programming languages.
a.
  • due to time or financial constraints, some programs may return an approximation of a solution.
b.
  • both benefits and drawbacks exist when selecting one control structure over another in a code.
c.
  • programs can use multiple methods to arrive at a solution.
d.
  • there are times when a program needs to be selected for a specific purpose, such as performance, reusability, and/or ease of implementation.
e.
  • multiple algorithms can solve the same problem.
  • algorithms can operate with a specific priority in mind, such as speed, simplicity, and/or safety.
Digital Literacy and Computer Science
DLIT (2018)
Grade: 9-12
4) Use and adapt classic algorithms to solve computational problems.

Examples: Sorting, searching, shortest path, and data compression.

Insight Unpacked Content
Evidence Of Student Attainment:
Students will:
  • use classic algorithms to solve computational problems.
  • adapt classic algorithms to solve computational problems.
Knowledge:
Students know:
  • classic algorithms exist that can be used and adapted to meet one's needs.
  • that it can be easier to alter code than to create it from scratch.
Skills:
Students are able to:
  • use and adapt classic algorithms to solve computational problems.
Understanding:
Students understand that:
  • algorithms can be altered to fit another use than originally designed for.
Tags: algorithm, concept invention, iterate, selection, sequencing, 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