Computer Science Principles Unit 5 Chapter 1 Lesson 10: Building an App: Color Sleuth

Learning Resource Type

Classroom Resource

Subject Area

Digital Literacy and Computer Science

Grade(s)

9, 10, 11, 12

Overview

This lesson attempts to walk students through the iterative development process of building an app (basically) from scratch that involves the use of if statements. Following an imaginary conversation between two characters - Alexis and Michael - students follow the problem solving and program design decisions they make for each step of constructing the app. Along the way, they decide when and how to break things down into functions, and of course, discuss the logic necessary to make a simple game.

The last step - writing code that executes an end-of-game condition - students must do on their own. How they decide to use if statements to end the game will require some creativity. The suggested condition - first to score 10 points - is subtly tricky and can be written in many different ways.

At the conclusion of the lesson, there is three practice Create PT-style questions as well as resources explaining the connection between this lesson and the actual Create PT. Depending on how you use these materials they can easily add an additional day to this lesson.

Students will be able to:
- write code to implement solutions to problems from pseudocode or description.
- follow the iterative development process of a collaboratively created program.
- develop and write code for conditional expressions to incorporate into an existing program.
- write a large program from scratch when given directions for each step.

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

Differentiate between a generalized expression of an algorithm in pseudocode and its concrete implementation in a programming language.

UP:DLCS18.HS.3

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

DLCS18.HS.5

Design and iteratively develop computational artifacts for practical intent, personal expression, or to address a societal issue by using current events.

UP:DLCS18.HS.5

Knowledge

Students know:
  • how to design and develop computational artifacts for practical intent.
  • how to design and develop computational artifacts for personal expression.
  • how to design and develop computational artifacts to address a societal issue by using current events.

Skills

Students are able to:
  • design and develop computational artifacts using an iterative design process.
  • use current events to bring merit to computational artifacts.

Understanding

Students understand that:
  • design should be an iterative process whereby the designer seeks feedback to improve upon his/her creation.
Digital Literacy and Computer Science (2018) Grade(s): 09-12

DLCS18.HS.6

Decompose problems into smaller components through systematic analysis, using constructs such as procedures, modules, and/or objects, with parameters, and which return a result.

UP:DLCS18.HS.6

Vocabulary

  • parameters
  • procedures
  • modules
  • objects
  • control structures

Knowledge

Students know:
  • removing unessential details can make a process simpler.
  • control structures can assist in programming decisions.
  • how to create a program that returns a result.

Skills

Students are able to:
  • decompose a problem.
  • create a program that returns a result.
  • implement control structures.

Understanding

Students understand that:
  • removing unessential details can make a process simpler.
  • control structures can assist in programming decisions.
Digital Literacy and Computer Science (2018) Grade(s): 09-12

DLCS18.HS.9

Demonstrate the ability to verify the correctness of a program.

UP:DLCS18.HS.9

Vocabulary

  • compile
  • program
  • syntax

Knowledge

Students know:
  • proper syntax and formatting for a coding language.
  • how to identify coding errors in a programming language.
a.
  • programs must be tested to verify that the desired task is executed properly.
  • testing a program requires a scenario where you can easily verify that the result of the program is correct/accurate.
b.
  • a program can contain one of the following properties, but not be an appropriate program: correctness, efficiency, scalability and readability
  • it is important to have others review your code.
  • that to be a quality program, code must be correct, efficient, scalable and readable.

Skills

Students are able to:
  • analyze code for proper syntax and formatting.
a.
  • create a test case with verifiable results.
  • execute a program with the created test case to verify program performance.
  • locate errors in programming by executing test cases.
b.
  • work with others to review their code for correctness, efficiency, scalability and readability.

Understanding

Students understand that:
  • programming languages each have their own required formatting which must be adhered to for a program to run correctly.
  • errors in programming languages prevent the program from executing its task.
  • each language has its own syntax and method for identifying potential errors.
a.
  • code can be formatted correctly and a program can still produce unintended results.
  • a test case is vital to verifying that a program is executing a task as intended.
b.
  • to be a quality program, code must be correct, efficient, scalable and readable.
  • it is important to have others proofread your code.
Digital Literacy and Computer Science (2018) Grade(s): 09-12

DLCS18.HS.10

Resolve or debug errors encountered during testing using iterative design process.

UP:DLCS18.HS.10

Vocabulary

  • debug

Knowledge

Students know:
  • steps of the problem solving process.
  • how to identify errors in an iterative design process.

Skills

Students are able to:
  • review a process and identify errors in procedure.
  • rectify errors found in a process.
  • test resolution to verify that the process now runs as intended.

Understanding

Students understand that:
  • errors in a process can prevent a solution.
  • resolving an error will allow the process to function as intended.
Digital Literacy and Computer Science (2018) Grade(s): 09-12

DLCS18.HS.40

Use an iterative design process, including learning from mistakes, to gain a better understanding of a problem domain.

UP:DLCS18.HS.40

Knowledge

Students know:
  • that creating an artifact is an iterative process.
  • that feedback serves to make products better.
  • that mistakes are teaching tools that help determine how not to solve a problem.

Skills

Students are able to:
  • create and publish.
  • process constructive feedback.
  • persevere through mistakes.

Understanding

Students understand that:
  • creating an artifact is an iterative process.
  • feedback serves to make products better.
  • mistakes are teaching tools that help determine how not to solve a problem.

CR Resource Type

Learning Activity

Resource Provider

Code.org

License Type

Custom
ALSDE LOGO