## Lesson Summary

Summary

To conclude the unit, students will complete a small project as well as a written assessment.  The project requires students to parse text and search through lists or words to find a specific characteristic.  The assessment covers integers, strings, booleans, loops, if statements, and lists.

Outcomes

• Students will synthesize concepts from the previous lessons to create their first project in PyCharm.
• Students will design a function and determine the relationship between algorithms and functions.

Overview

1. Getting Started (5 min)
2. Independent Activity (40 min)
3. Wrap Up (5 min)

## CSP Objectives

Big Idea - Creativity
• EU 1.1 - Creative development can be an essential process for creating computational artifacts.
• LO 1.1.1 - Apply a creative development process when creating computational artifacts. [P2]
• EK 1.1.1B - Creating computational artifacts employs an iterative and often exploratory process to translate ideas into tangible form.
• EU 1.2 - Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
• LO 1.2.3 - Create a new computational artifact by combining or modifying existing artifacts. [P2]
• EK 1.2.3A - Creating computational artifacts can be done by combining and modifying existing artifacts or by creating new artifacts.
• EK 1.2.3C - Combining or modifying existing artifacts can show personal expression of ideas.
• LO 1.2.4 - Collaborate in the creation of computational artifacts. [P6]
Big Idea - Algorithms
• EU 4.1 - Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
• LO 4.1.1 - Develop an algorithm for implementation in a program. [P2]
• EK 4.1.1A - Sequencing, selection, and iteration are building blocks of algorithms.
• EK 4.1.1B - Sequencing is the application of each step of an algorithm in the order in which the statements are given.
• EK 4.1.1C - Selection uses a Boolean condition to determine which of two parts of an algorithm is used.
• EK 4.1.1D - Iteration is the repetition of part of an algorithm until a condition is met or for a specified number of times.
• EK 4.1.1E - Algorithms can be combined to make new algorithms.
• EK 4.1.1F - Using existing correct algorithms as building blocks for constructing a new algorithm helps ensure the new algorithm is correct.
• EK 4.1.1G - Knowledge of standard algorithms can help in constructing new algorithms.
• EK 4.1.1H - Different algorithms can be developed to solve the same problem.
• EK 4.1.1I - Developing a new algorithm to solve a problem can yield insight into the problem.
• LO 4.1.2 - Express an algorithm in a language. [P5]
• EK 4.1.2A - Languages for algorithms include natural language, pseudocode, and visual and textual programming languages.
• EK 4.1.2B - Natural language and pseudocode describe algorithms so that humans can understand them.
• EK 4.1.2C - Algorithms described in programming languages can be executed on a computer.
• EK 4.1.2G - Every algorithm can be constructed using only sequencing, selection, and iteration.
• EK 4.1.2I - Clarity and readability are important considerations when expressing an algorithm in a language.
Big Idea - Programming
• EU 5.1 - Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
• LO 5.1.1 - Develop a program for creative expression, to satisfy personal curiosity, or to create new knowledge. [P2]
• EK 5.1.1A - Programs are developed and used in a variety of ways by a wide range of people depending on the goals of the programmer.
• EK 5.1.1B - Programs developed for creative expression, to satisfy personal curiosity, or to create new knowledge may have visual, audible, or tactile inputs and outputs.
• EK 5.1.1D - Additional desired outcomes may be realized independently of the original purpose of the program.
• LO 5.1.2 - Develop a correct program to solve problems. [P2]
• EK 5.1.2A - An iterative process of program development helps in developing a correct program to solve problems.
• EK 5.1.2B - Developing correct program components and then combining them helps in creating correct programs.
• EK 5.1.2C - Incrementally adding tested program segments to correct working programs helps create large correct programs.
• EK 5.1.2D - Program documentation helps programmers develop and maintain correct programs to efficiently solve problems.
• EK 5.1.2E - Documentation about program components, such as code segments and procedures, helps in developing and maintaining programs.
• EK 5.1.2F - Documentation helps in developing and maintaining programs when working individually or in collaborative programming environments.
• EK 5.1.2G - Program development includes identifying programmer and user concerns that affect the solution to problems.
• EK 5.1.2I - A programmer's knowledge and skill affects how a program is developed and how it is used to solve a problem.
• EK 5.1.2J - A programmer designs, implements, tests, debugs, and maintains programs when solving problems.
• EU 5.2 - People write programs to execute algorithms.
• LO 5.2.1 - Explain how programs implement algorithms. [P3]
• EK 5.2.1A - Algorithms are implemented using program instructions that are processed during program execution.
• EK 5.2.1B - Program instructions are executed sequentially.
• EK 5.2.1C - Program instructions may involve variables that are initialized and updated, read, and written.
• EK 5.2.1D - An understanding of instruction processing and program execution is useful for programming.
• EK 5.2.1I - Executable programs increase the scale of problems that can be addressed.
• EK 5.2.1J - Simple algorithms can solve a large set of problems when automated.
• EU 5.3 - Programming is facilitated by appropriate abstractions.
• LO 5.3.1 - Use abstraction to manage complexity in programs. [P3]
• EK 5.3.1A - Procedures are reusable programming abstractions.
• EK 5.3.1B - A procedure is a named grouping of programming instructions.
• EK 5.3.1C - Procedures reduce the complexity of writing and maintaining programs.
• EK 5.3.1D - Procedures have names and may have parameters and return values.
• EK 5.3.1E - Parameterization can generalize a specific solution.
• EK 5.3.1F - Parameters generalize a solution by allowing a procedure to be used instead of duplicated code.
• EK 5.3.1G - Parameters provide different values as input to procedures when they are called in a program.
• EK 5.3.1H - Data abstraction provides a means of separating behavior from implementation.
• EK 5.3.1I - Strings and string operations, including concatenation and some form of substring, are common in many programs.
• EK 5.3.1J - Integers and floating-point numbers are used in programs without requiring understanding of how they are implemented.
• EK 5.3.1K - Lists and list operations, such as add, remove, and search, are common in many programs.
• EK 5.3.1L - Using lists and procedures as abstractions in programming can result in programs that are easier to develop and maintain.
• EU 5.4 - Programs are developed, maintained, and used by people for different purposes.
• LO 5.4.1 - Evaluate the correctness of a program. [P4]
• EK 5.4.1C - Meaningful names for variables and procedures help people better understand programs.
• EK 5.4.1D - Longer code segments are harder to reason about than shorter code segments in a program.
• EK 5.4.1E - Locating and correcting errors in a program is called debugging the program.
• EK 5.4.1F - Knowledge of what a program is supposed to do is required in order to find most program errors.
• EK 5.4.1G - Examples of intended behavior on specific inputs help people understand what a program is supposed to do.
• EK 5.4.1H - Visual displays (or different modalities) of program state can help in finding errors.
• EK 5.4.1I - Programmers justify and explain a program’s correctness.
• EK 5.4.1J - Justification can include a written explanation about how a program meets its specifications.
• EK 5.4.1K - Correctness of a program depends on correctness of program components, including code segments and procedures.
• EK 5.4.1L - An explanation of a program helps people understand the functionality and purpose of it.
• EK 5.4.1M - The functionality of a program is often described by how a user interacts with it.
• EK 5.4.1N - The functionality of a program is best described at a high level by what the program does, not at the lower level of how the program statements work to accomplish this.
• EU 5.5 - Programming uses mathematical and logical concepts.
• LO 5.5.1 - Employ appropriate mathematical and logical concepts in programming. [P1]
• EK 5.5.1A - Numbers and numerical concepts are fundamental to programming.
• EK 5.5.1D - Mathematical expressions using arithmetic operators are part of most programming languages.
• EK 5.5.1E - Logical concepts and Boolean algebra are fundamental to programming.
• EK 5.5.1F - Compound expressions using and, or, and not are part of most programming languages.
• EK 5.5.1G - Intuitive and formal reasoning about program components using Boolean concepts helps in developing correct programs.
• EK 5.5.1H - Computational methods may use lists and collections to solve problems.
• EK 5.5.1J - Basic operations on collections include adding elements, removing elements, iterating over all elements, and determining whether an element is in a collection.

## Math Common Core Practice:

• MP1: Make sense of problems and persevere in solving them.
• MP5: Use appropriate tools strategically.
• MP6: Attend to precision.
• MP7: Look for and make use of structure.
• MP8: Look for and express regularity in repeated reasoning.

## Common Core Math:

• S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable

## NGSS Practices:

• 3. Planning and carrying out investigations
• 5. Using mathematics and computational thinking
• 8. Obtaining, evaluation, and communicating information

## Key Concepts

Students should synthesize concepts from the previous lessons to create their first project in PyCharm.  This lesson also pushes a student to think about how to design a function, and the relationship between algorithms and functions.

## Essential Questions

• How are algorithms implemented and executed on computers and computational devices?
• What kinds of problems are easy, what kinds are difficult, and what kinds are impossible to solve algorithmically?
• How are algorithms evaluated?
• How are programs developed to help people, organizations or society solve problems?
• How are programs used for creative expression, to satisfy personal curiosity or to create new knowledge?
• How do computer programs implement algorithms?
• How do people develop and test computer programs?
• Which mathematical and logical concepts are fundamental to computer programming?

What are the key elements we need to think about when designing a function?

## Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

• Word Play
• Word Play Rubric
• Assessment

# Getting Started (5 min)

• Ask the students to work in small groups to create pseudocode for the following function:
• Create a function titled` 'is_palindrome'` that inputs a word and determines whether that word is a palindrome.  If it is, return `True`, otherwise return `False`.
• As a class, use the groups' pseudocode to create the function `'is_palindrome'`.
• Introduce the projects to students.  They will have a total of 2 sessions to complete their project.

# Independent Activity (40 min)

Students work individually on the Word Play and Assessment which are found in the lesson resource folder.

# Wrap up (5 min)

Allow students to continue working to the end of class on their projects; have individual check-ins with students to make sure that they are on track and have a clear idea of what they need to complete the following day.

## Options for Differentiated Instruction

Option to allow students to complete Word Play with partners to promote collaboration, then complete the written assessment individually.

## Formative Assessment

Teacher will monitor the progress of the students on each of the programs in Word Play.