Lesson Summary

Summary: This optional lesson can be used as a brief preview to the course on the first day of class when teachers typically have many classroom administrative tasks to accomplish, but teachers also want to set the stage for the class. Students begin thinking about the influences of technology as they engage in a Think-Pair-Share strategy about the computing innovations that have impacted their lives. In addition, this is an opportunity to set beginning expectations about interacting with classmates in collaborative activities and to model writing in the content area.

Outcomes:

  • Students will provide examples of how technology makes a difference in their lives.
  • Students will describe both the positive and negative impacts of the computing innovation that has had the most impact on their life.

Overview:

  1. Getting Started (5 min) - Journal Activity
  2. Guided Activities (40 min) - Students Think-Pair-Share and engage in independent writing
  3. Wrap Up (5 min) Summary and Homework Assignment

Source: This lesson is adapted from Code.org (Unit 1 Lesson 00)

Learning Objectives

CSP Objectives

Common Core ELA:

  • WHST 12.1 - Write arguments on discipline specific content

Key Concepts

Innovation is an important theme of this course. Students will become more aware of how innovation in technology has affected their lives.


Essential Questions

  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?

Teacher Resources

Student computer usage for this lesson is: none

Student journals, if they are ready. Otherwise, paper for students to write on.

Lesson Plan

Getting Started (5 min) 

This short activity can be used after any required first-day administrative duties.

Introducing Journals and "Think-Pair-Share" (5 min)

Each lesson in the course will start out with a brief prompt for students to respond to in their journals. They will pair off to discuss their answers, then share their findings with the class.

If you have the journals ready, have students write the answer to this prompt in the journal: Identify technological innovations that you and/or your families use. (At LEAST four, how many can you name?)

If Clarification is Needed:

Guided Activities (40 min)

Activity - Think-Pair-Share (20 min)

  1. Have students share journal ideas in pairs. Each student should circle the four most interesting ideas in their journal. 
  2. Have pairs combine into groups of 4-6 and write 4-6 unique, interesting ideas from their group on post-it notes or paper.
  3. Display student ideas at the front of the room on a board or poster using pen, chalk or post-its.
    (Suggestion: Take turns letting each group contribute one thing at a time and explain how it's used in their lives. Either disallow duplicates or notice how many groups choose the same things.)
  4. Challenge students as a group to think of at least 10 more things that are not on the list and add them.

Activity - Independent Activity (20 min)

  1. Tell students to complete this sentence: "The computing innovation that has had the most impact on my life is .... because ....". 
  2. Write the completed sentence and describe both the positive and negative impacts of the innovation in a short paragraph in your journal.
  3. Allow students a few minutes to independently and silently think and write.
  4. Point out that many devices communicate over the internet. They use sensors to gather data about the world. Sensor networks facilitate new ways of interacting with the environment and with physical systems. Have students think of a connected device that has had, or could have, impact on their lives. This is the fastest growing area of the internet: connected devices. (traffic lights, self-driving cars, cell phone GPS, activity trackers, etc.)
  5. If there is time, join each student pair with another pair for a second round of sharing and discussion.
  6. Suggestion: A large-group class discussion can replace the second pair-share portion of the activity if it is more appropriate for the class setting or the time available.

Note: Written communication is an important skill. This curriculum provides a variety of opportunities for students to develop the skills that they will need to perform well in the Performance Tasks.  

Wrap-Up (5 min)

Summarize the various ways that computing innovation has affected our lives. Assign the following homework.

Homework

Ask students to interview an adult and ask, "What computing innovation has had the most impact on your life? In what ways has your life been affected?"

Students will record the adult’s answer and compare and contrast the answer with their own original answer in a brief paragraph.


Options for Differentiated Instruction

Optional Extension:

Suggest that students create timelines showing the years when the various innovations were invented or became available to consumers. (They could make their best guesses as a class and reorder the ideas on the board.)


Evidence of Learning

Summative Assessment

Paragraph about the positive and negative impacts of the innovation that has had the most impact on the student's life in journal at the end of class.

Paragraph for homework that compares and contrasts an adult's answer to their own journal entry answer after conducting a discussion with an adult at home.

Lesson Summary

Summary

Through presentations, videos, and discussion, students discover how technology has been changing and brainstorm ideas for how the next generation will have a different relationship with technology than the current generation. Students will also learn the relative measures of computer storage (KB, MB, etc.)

This is a prelude to the idea of big data and the impact of technology as well as an introductory opportunity to start to develop team norms, effective group participation and a respectful environment where every student is encouraged to contribute and share their perspective. 

Outcomes

  • Students describe some of the ways that technology has been changing and has generated and increased creativity in other fields
  • Students brainstorm ideas for how the next generation will have a different relationship with technology than the current generation
  • Students explore the improvements in picture quality as a measure of improvements in the internet overall.
  • Students explain connections between computing concepts
  • Students compare the relative measures of computer storage 
  • Students participate in groups; valuing diverse perspectives and skills.

Overview

1. Introduction (5 min) - Students journal about the different relationships each generation has with technology.

2. Activities (40 min) - Students practice organizing by relative size and create posters to demonstrate learning.

3. Wrap-up (5 min) - Posters are shared with the class.

Learning Objectives

CSP Objectives

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How can computing extend traditional forms of human expression and experience?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?

Teacher Resources

Student computer usage for this lesson is: none

Videos:

PowerPoints (in the Lesson Resources folder):

  1. Unit0_Lesson2_The Information Age How Big.pptx
  2. Unit0_lesson2_TheFuture.ppt

Students should have paper for taking notes. (If desired, use preprinted Information Age Notes, in the Lesson Resources folder)

Print out "Relative Measure Word Strips to cut" papers and "Measure Quantity Word Strips to cut" papers (in the Lesson Resources folder) and cut them into strips to give to students for the activity.

8 big sheets of big poster paper to place at the front of the room labeled:

  1. communication
  2. education
  3. automation (robotics)
  4. privacy 
  5. entertainment
  6. transportation
  7. medicine & health
  8. the Internet

Post-it notes for students

Lesson Plan

Introduction - Journal and Discussion (5 min)

1. Journal: How were computers and technology different one generation ago?

2. Pair and share journal ideas, compile a class list. (Ideas you might suggest if they’re stuck: bigger, slower, less storage, less portable, not inside of so many other things, not as pervasive, less voice ability, less connection to the Internet, phones weren't very smart, more expensive, Previous generation: land lines, stand in one place when talking on the phone, separate cameras, internet via phone modem, no GPS, etc.)

3. Prompt students to come up with their own definition of what "1 generation ago" means. (Now a generation is considered to be about 25 years. A century ago it was about 20 years - from Ancestry.com)
{optional question for thought/discussion: Why were generations shorter a hundred years ago? ( don't tell them the answer, try to lead them to ask each other good questions to guide them to an answer: shorter lifespans, more death from disease, younger marriage age http://www.ancestry.com.au/learn/learningcenters/default.aspx?section=lib_Generation )}

4. Discuss the connections between what computing concepts are available and the communication, jobs and services that are available from one generation to the next.

Activities: (40 min)

Part 1 (3-4 min)

Hand out mixed up relative measure papers (a document with strips to cut is in the Lesson Resources folder) to 8 students.

  • In order: kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zettabyte, and yottabyte.

Ask them to try to line up by relative size at the front of the room to display the terms from smallest to largest. Ask if the class agrees, make changes by group vote. Don’t tell them if they're right yet. Tape or post the strips to the front wall. 

Teacher Note: Be sure to get students' names and introduce them as part of the goal of developing a classroom community of learners. Continuously encourage positive social interactions. 

Part 2 (3-4 min)

Hand out the 8 papers with measured quantities (a document with strips to cut is in the Lesson Resources folder).

  • In order: a picture the size of your fingernail, a small novel, a symphony recorded in high fidelity sound, the whole library of congress, 5 years' worth of the data recorded by NASA earth orbit satellite, all the words ever spoken by humankind written down, all recorded TV broadcasts and movies stored as video, and amount of data the National Security Administration can store.

Ask those students to try to match themselves up with the relative measure papers. Give the class a chance to rearrange by group vote. Tape or post the strips to their relative measure paper. 

Part 3 (10 min)

  1. Present the PowerPoint: Unit0_Lesson2 The Information Age. How Big. 
    • Have students take notes on the correct sequence of relative measures. (Use blank paper or Student notes for The Information Age How Big) Rearrange paper strips at the front of the room as needed to match the true order. (5 min)
  2. Show the video: The information age. Big Data is Changing the World (3:51)
  3. Have groups try to guess how many people used the Internet each day in 2000 and now, how many searches were done each day on Google in 1998 and now. (3 min)
  4. Show the video: 2:31 https://www.youtube.com/watch?v=qGYmML0e0X4 Exalogic: Ready for the Future by Oracle (only show the first 1:14)

Part 4 (20 min)

  1. Present the PowerPoint Unit0_Lesson2 The Future. 
  2. Group students in 3's or 4's. (max of 8 groups)
    • Groups brainstorm: What new technology might the next generation have?
      • Ask them to think of how technology will be different for the next generation in each of these categories: communication, education, automation (robotics), transportation, medicine and health, the Internet, privacy, and entertainment. Write at least 10 ideas for each group on post it notes, 1 idea per post it. (5 min)
      • Note: 1 generation is about 25 years, so the previous generation was born around 1975 and went to high school around 1990. You were born around 2000, and are in high school now. The next generation will be born around 2025, and be in high school around 2040. 
  3. Place large posters at the front of the room. Take turns having groups contribute 1 post it note at a time and explain their ideas. (5 min)
    • Groups get 1 point for each unique idea that gets posted.
    • The group with the most points, when all notes have been posted, chooses the poster they want to work on. The group with the 2nd highest score chooses next, etc.
  4. Point out that visual data is the most popular and largest growing area of Internet data for people. (pictures, videos) Students are going to create a visual artifact: a way to communicate an idea visually. They are welcome to use online sources for pictures or create their own. 
  5. Groups design a visual artifact on their poster: a labeled drawing, concept map, cartoon (stick figures are fine), or some other visual to describe life for the next generation. Encourage students to do something visually appealing, creative, interesting, or informative. Prepare to explain how the availability of new technology connects to concepts in computing. How do computers make each area different than it was before?  How do computers allow us to be more creative visually to entertain, inform and do business? (how-to videos, animated advertisements, posting pictures and videos, etc. ) ( 10 min ) 

Wrap-Up (5 min)

Display the posters created by the class, share details and ideas from the posters. Have students journal or write a reflection on these key questions:

  1. The team development process. How do you facilitate a positive collaborative environment where all students contribute and bring their unique perspectives to create a more meaningful product than one person alone could?
  2. Impacts of technology: How have computing advances generated creativity in other fields?

Additional Activities if Time Permits:

  1. Show a video on a possible work world of the future: https://www.youtube.com/watch?v=t5X2PxtvMsU (5:51)
  2. Discuss what ideas are the same/different from the ideas that students shared.
  3. Have a vote on the posters for most creative, most unique, best detail, etc.

Options for Differentiated Instruction

Instead of having students move to the front of the room to sort the paper strips into order, you could print a set for each group of 3-4 students and have them match and arrange them at their desks.

If students have a strong interest, or if you have extra time, use the ideas in "Extensions to the lesson on the Future of Technology" document located in the resources folder.


Evidence of Learning

Formative Assessment

Self-checking exercise on identifying storage terms (KB, MB, etc.)


Summative Assessment

Assess group dynamics. Did everybody participate? Was communication positive within groups and respectful of the different needs and perspectives of group members?

Lesson Summary

Summary: This lesson is a basic introduction to algorithms and the nature of intelligence. Students will play tic-tac-toe (noughts and crosses is the British version) between a “highly intelligent piece of paper” and a human. Students will explore how to create an algorithm and the concept of computer intelligence.

Outcomes

  • Students will play tic-tac-toe using a specific algorithm.
  • Students will create and test a new algorithm for playing tic-tac-toe.

Overview

  1. Getting Started (5 min) - Journal
  2. Introduction (5 min) - PowerPoint
  3. Guided Activities (35 min) - Students play tic-tac-toe with a given algorithm, then practice designing and implementing their own.
  4. Wrap-up (5 min) - Students create definitions and assign homework for Lesson 1-1
  5. Optional Activity (5 min) - Students examine an actual "AI" (simple game playing program) created for tic-tac-toe in Python

Source: This lesson is adapted from a lesson created by Paul Curzon, Queen Mary, University of London.

Learning Objectives

CSP Objectives

Common Core ELA:

  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes

NGSS Practices:

  • 8. Obtaining, evaluation, and communicating information

Essential Questions

  • How do computer programs implement algorithms?
  • How does computing enhance human communication, interaction, and cognition?

Teacher Resources

Student computer usage for this lesson is: none

A PowerPoint for this lesson is included in the Lesson Resources folder - IntelligentPaper.pptx and IntelligentPaper.pdf

Copies for student pairs of "intelligent paper directions" with tic-tac-toe directions on one side, and blank on the other - in the Lesson Resources folder - IntelligentPaperDirections.pdf

The wrap-up questions are available in the Lesson Resources folder as Questions To Consider.docx

Optional: a musical greeting card, a paper folded into a fortune teller (http://en.wikipedia.org/wiki/Paper_fortune_teller), a page of equations

The Python program for the optional activity is located in the Lesson Resources Folder - TicTacToeAI.py

Lesson Plan

Getting Started (5 min) - Journal

What could make a piece of paper intelligent? (Think-Pair-Share)

Introduction of Content (5 min)

(Use IntelligentPaper.pptx in the Lesson Resources folder to help deliver this lesson.)

Challenge the students by saying that you have a piece of paper that is at least as smart as any human. (Show the blank side of the paper, don't tell the students yet, but it has directions on how to play tic-tac-toe on the back.) Ask if anybody believes that this is possible.

Show students examples of "smart papers," such as:

  • A page full of equations
  • A paper folded into a fortune teller http://en.wikipedia.org/wiki/Paper_fortune_teller
  • A greeting card that plays music when you open it. It's made of paper, is it intelligent? (it's the chip inside that's smart, and somebody had to program it to make it do something... same with any paper, a person needs to put the information on there to "give" it intelligence)

Encourage discussion and debate, prod students to argue their point for or against intelligence, and get them to develop their own criteria and definition for intelligence. Write the class definition and criteria on the board.

Guided Activities (35 min)

Part 1 - Game Activity (5 min)

Tell the class that the paper has never lost a game: it has perfect intelligence.

Challenge students to play a game against the paper. The paper is peripherally challenged (it has no arms, and thus needs somebody to do its work for it). One person represents humankind, while the other person represents the paper. Play tic-tac-toe with a partner. The paper must begin the game.

Possible outcomes:

  • Paper wins or draws.
  • Humans give up. (They often do.)
  • Try again and see if it’s just luck?
  • Humans cheat. (They sometimes do.)
  • Humans cause an error. (It happens.)

But, the paper WILL NOT LOSE.

Try letting humankind go first. (Wait and try it: The paper will lose. Why?)

Part 2 - Independent Activity (15 min)

Challenge students to write out detailed directions (an algorithm) that will never lose the game whether it goes first or second. Point out that algorithms are made by putting detailed steps in order (sequencing), making choices depending on the situation (selection) and repeating certain sections (iteration).

Part 3 - Algorithms, Programs and Computers (15 min)

Students should use their new algorithm to play against each other. Follow the same model for the paper versus the human game.

Discuss:

Computers programs implement algorithms.

Computer programs carry out algorithms by controlling the computer memory, central processing unit, input and output.  When we carried out our tic tac toe algorithm what did we do that corresponds to each computer component?

Memory:

Central Processing Unit:

Input:

Output:

 

Additional Possible Activities and Discussions Time Permitting:

Wrap-up (5 min)

See if students know what a CPU is. If not, define. [

CPU is the abbreviation for central processing unit or processor, the brains of the computer where most calculations take place.

Reflection: (written in journal or discussed as a class)

How is a computer CPU (processor) similar to/different from a human brain? (both process information, can use logic and math, can follow instructions; computers only do what they are told, can work without need of food or sleep, etc.)

A human only has 1 brain but a computer can have multiple CPUs. How could a computer with multiple processors (CPUs) divide up a task like playing tic-tac-toe? (This is a good optional exercise if there is extra time, to divide up what the steps are and see if any can be done in parallel to save time. example: one processor checks rows, one checks colums to see if there is a winner)

Have students write their own definitions for the four words at the end of the presentation:

  • Computer program
  • Artificial intelligence
  • Peripheral
  • Algorithm

Optional Activity (5 min)

(Use PyCharm or some other Python environment to show the TicTacToeAI.py program from the Lesson Resources folder.)

  • Follow slides 14-16 of the PowerPoint to review the Python "AI" written for TicTacToe. Encourage discussion on how a computer can "think" in order to win the game.
  • Play a few rounds against the program and see whether a student can figure out how to beat it.
  • Discuss how the program could have been better designed.

Homework

Assign homework for Lesson 1-1: Provide students a copy of the “Questions to Consider” in the resources folder and assign the reading:

Blown to Bits – Chapter 1, can be found here http://www.bitsbook.com/wp-content/uploads/2008/12/chapter1.pdf and is available in the lesson resources folder for Unit 0 Lesson 3.




Options for Differentiated Instruction

Extension: If you have extra time, have a championship contest between one set of student-generated instructions and another, alternating who goes 1st and 2nd. You can work in groups of three, with one person acting as the judge if desired.


Evidence of Learning

Formative Assessment

Vocabulary entries in journals from the end of the PowerPoint presentation

Group participation in interactive activity

Writeup about a more general solution


Lesson Summary

Pre-lesson preparation

Students must complete a pre-reading assignment (the first chapter of Blown To Bits, which is available online or in the Resources folder). This pre-reading can be assigned at the end of Unit 0.

Summary

Students will read about the "Digital Explosion" and discuss exponential growth.  They will discuss and share insights on what a world without digital communication would be like and investigate some of the things that are possible because of digital communication. They will then share their findings with the class.

Outcomes

  • Students will explain how innovation affects communication, interaction, and cognition.
  • Students will explain how computing has impacted innovation in other fields.
  • Students will analyze effects of computing including increased ability to collaborate.
  • Students will explain connections between technology, and economic and social differences.
  • Students will describe how widespread access to information facilitates the identification of problems, development of solutions, and dissemination of results and the lack of that access limits all of these functions.

Overview

Session 1

  1. Getting Started - (5 min) Set a timer. In your journal list all the ways you communicated in the past 24 hours both in person and using technology. Give students 1 minute to list all of the ways they have engaged in communication today (verbal/non-verbal). Compile a class list of commucations used.
  2. Activity (30 min) - Teams brainstorm on their usage of digital communication and discuss how life would be different without it.
  3. Activity (10 min) - Think-Pair-Share and independent writing.
  4. (5 min) - Pair activity on exponential growth
  5. Homework - Each team member will write one reflection question, or interview 3 people about what would be different in a world without digital communication and write up what they learn.

Session 2

  1. Getting Started (5 min) - Journal Activity
  2. Activity (15 min) - Teams engage in algorithm / calculation activity without the benefit of digital tools.
  3. Activity (30 min) Teams brainstorm and organize ideas about the impact of digital communication.
  4. Homework - Students will write a reflection on how a particular aspect of society depends on computers.

Session 3

  1. Getting Started / Activity (35 min) - Students will each write a short story about a world without digital communication.
  2. Activity (15 min) - Students will journal about their social media post from Session 1, and share with a partner. 

 

Learning Objectives

CSP Objectives

NGSS Practices:

  • 5. Using mathematics and computational thinking
  • 7. Engaging in argument from evidence
  • 8. Obtaining, evaluation, and communicating information

NGSS Content:

  • HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants.

Key Concepts

Chapter 1 of "Blown to Bits" and the lesson motivate students to begin thinking about the advancement of technology and its impact on many aspects of their lives (both positively and negatively). Subsequent lessons will research particular impacts on society in more depth.

Students will consider a world without digital communication to emphasize the impact that computers have on their everyday lives and how integral computers and digital communication have become to our ordinary existence.


Teacher Resources

Student computer usage for this lesson is: none

TEACHER RESOURCES

In the Lesson Resources Folder:

Prior to the Lesson:

  • Provide students a copy of the “Questions to Consider” (in the resources folder) and assign the Blown to Bits reading assignment (above)

During the lesson, students will need:

  • Student Journal

 

Lesson Plan

Session 1

This lesson assumes that students have either taken a previous CS course or that you have done Unit 0, so that students know what a computer is, how to write a basic algorithm, and the basic history of technology. It also assumes that students have read Blown to Bits, Chapter 1.

Getting Started (5 min)

Set a timer. In your journal list all the ways you communicated in the past 24 hours both in person and using technology. Give students 1 minute to list all of the ways they have engaged in communication today (verbal/non-verbal). Compile a class list of commucations used.

Activity (30 min) – Form Teams and Investigate Communication and Digital Communication

Use a creative method for dividing students up into teams of 3-4 (line up by birthday, etc.)

You can use the presentation "What If Part 1" as a guide through this lesson.

  • Have each team underline any communication methods that ALL team members wrote down.
  • Using the Social Media Post Template handout, have students create a social media post that reflects their current status. Display these posts around the room.
  • Present the scenario: what if all digital communication suddenly stopped working?
    • Encourage discussion. Have teams brainstorm a list of possible answers to the following question:  "What will be impacted if digital communication is no longer an option?"
  • How could you check the news to find out what caused the communication issue? 
    • Point out that all digital devices would no longer work because they use digital communication internally between the processor and memory.
    • In your teams, create a definition of digital.  (Remember, you don’t have any digital devices to look it up!)
    • What kinds of communication will still work? (Hint: Not the TV: all of the signals are digital.)
    • Have teams try to build up a comprehensive list of the things we use that are digital.
    • Have teams complete the graphic organizer of what would be different in each of these places without digital communication:
      At School At Home Other Places
           

Activity (10 min) - Think-Pair-Share 

Have students discuss with their partner the answers to the pre-reading questions from Blown To Bits Chapter 1 (see Questions to Consider in Teacher Resources). 

Choose an open-ended question from the pre-reading questions. Either:

  • give examples of things today that are stored in bits
  • describe examples of innovations that are neither good nor bad
  • list ways that life is more complicated because of the explosion of bits

Have partners pick their most interesting answers and post them or write them on something in the front of the room to share with the class.

 

Activity: (5 min)

Have students work in pairs to discuss and answer the following questions. (If possible, provide students with calculators. An exact value is not required to formulate an answer. The choices reflect three different types of growth.)

Someone offers you a summer job with a choice of three pay rates:

1. $10 per hour for eight hours of work for day for 30 days.

2. One dollar the first day, two dollars the second day, three dollars the third day, and so on (increasing by one dollar each day).

3. One cent on day one, two cents on day two, four cents on day three, and so on (doubling each day for 30 days).

Which pay rate would you choose? Why? What does this illustrate?

Solution: After 30 days,

  • The first choice nets 10*8*30 = $2,400.
  • The second offer will pay $465.
  • The third offer will pay 2 to the 30th power (minus 1) cents, which is over $10 million.

Clearly, the last choice is the best, even though it starts with the lowest value (although you are unlikely to receive such an offer!)

This activity illustrates exponential growth (which was discussed in the chapter in the context of data growth).

Homework: 

Students may not use any digital devices to complete this activity.  This assignment must be handwritten.  If students need a copy of their assignment for the class discussion, they must write another copy. Have students submit their assignment at the start of the next class.

  1. Have the students interview three different people, outside of the class, using the following question:
    • How would life be different if we didn’t have any means of digital communication?
  2. Have the students write a summary of the interview that includes the following information:
    • Summary of the responses
    • Your opinion about the responses
    • What you learned by talking to others about the impact of losing digital communication

Session 2

Getting Started (5 min)

Have students write in their journals: What is the most important digital device in your life? Why is it the most important?

Activity (15 min) - Develop a Communication Plan 

Use the presentation "What If Part 2" to remind the students about the scenario from the previous class.  Working in the same teams from the previous class, have the students develop a step-by-step plan for getting a message to their parents without using any form of digital communication.  This activity must be completed without using any digital tool. 

Activity (30 min) - Discussing The Impact of Digital Communication

Teams brainstorm and organize ideas about the impact of digital communication. This activity uses the results from the Day 1 homework.

Discussion: Students work in their teams to answer the following questions: 

  1. How have the Web and the Internet changed the way people communicate and collaborate? (be sure to include email, SMS, online problem solving, data gathering and analysis & chat)
  2. How does the impact of computing innovations differ between national and socioeconomic groups?
  3. Describe a way in which social media has changed the way people communicate in the U.S.
  4. In what ways have the Internet and the Web changed health care, access to information, entertainment, and online learning?  How do these changes vary in different parts of the world?
  5. Describe how two groups (e.g., in different geographic regions, from different cultural backgrounds, in different socioeconomic classes or different work industries) are impacted differently by social media and online access.
  6. Describe how the impact of social media and online access differs in two different countries.
  7. How does digitally enabled collaboration enhance human capabilities?

 

Homework

Each member of your team should choose one of the following topics:

  • Science
  • Art
  • News
  • Music
  • Government
  • Business

*Note – these topics are just suggestions

In the following question, fill in the blank with your chosen topic. Write a paragraph responding to the question.  Be sure to include examples and evidence to support your ideas and answer.

  • How does _________ depend on computers?

Session 3

Warm up / Activity 1 (35 min) - A Short Story

Imagine that the digital world that we know now never existed.  There are no computers or cell phones -- no digital communication at all.  Write a short story that takes place in this non-digital world.  Include how your characters would communicate in different situations and how daily life would be.  Be as creative as you can.

If time permits, have a few students share their stories.

Activity 2 (15 min) - Reflections

For this activity, students need to use their last social media post the created on Day 1.

Journal - Hooray! Digital communication has been restored after three years. Look at your last social media post, and think about the following questions. 

  1. How could a stranger interpret your last digital footprint? Was it positive, negative, or neutral?
  2. How could you change your post to leave a more positive digital footprint?
  3. What would be your first social media post now that digital communication has been restored?

Have students discuss their reflections with an elbow partner.


Options for Differentiated Instruction

Consider different ways to choose teams and assign team roles

Interview with a User of an Enhancing Technology

If you are familiar with an individual who benefits from an abilities-enhancing innovation or a technology that helps the individual overcome a disability, interview the person about the impact the technology has had on his or her life. Ask them questions about how the innovation works, how it has affected the way they live (the ways in which they play or work). Ask about how it has affected their family and friends. If possible, record the interview. Ask for permission to share with your classmates or to post online.

Speculate about Today's Innovations

Select a recent innovation - something recently in the news. Predict the impact that this innovation will have on individuals. Predict any societal impacts you can foresee. Label the impacts as positive or negative. Explain your reasons for the label.

 


Lesson Summary

Summary

Computing greatly affects the everyday lives of today's teens, but many of them are not consciously aware of these influences. In this lesson, students investigate the impact of the Internet on their lives.

Using a presentation about modern computers as an example, the teacher models the process of asking questions, organizing ideas, doing research, and giving a presentation.  Students will then work in assigned groups to create presentations on the Internet and its Impact using online collaboration tools.

Students will experience some of the many collaborative tools available online and develop effective group communication skills.

Outcomes

  • Students will describe multiple ways that the Internet impacts our lives.
  • Students will use good research techniques to find and cite high-quality sources and to synthesize an original understanding of topics researched online.
  • Students will define basic vocabulary about the Internet (cloud, server, etc.).
  • Students will describe various tools that enable online collaboration.
  • Students will collaborate using online tools to develop and refine a presentation.
  • Students will collaborate and access information with speed and precision using computational tools.

Overview

  1. Getting Started (5 min) – Students Think-Pair-Share about the size and scope of the Internet.
  2. Teacher Overview (20 min) – Teachers present overview of the internet and introduce “pecha kuchas.”
  3. Group Activity (30 min) – Student work in groups to organize ideas for research on a particular topic using mind maps.
  4. Group Activity (65 min) – Students research their topic in groups and create “half pecha kuchas” to present to the class.
  5. Presentations (20 min) – Each group presents their pecha kucha in the 3.5 min format.
  6. Wrap Up (10 min) – Students discuss what they learned or observed from watching other groups’ presentations.

Learning Objectives

CSP Objectives

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 7. Engaging in argument from evidence
  • 8. Obtaining, evaluation, and communicating information

NGSS Content:

  • HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants.
  • HS-ETS1-3. Evaluate a solution to a complex real-world problem based on prioritized criteria and trade-offs that account for a range of constraints, including cost, safety, reliability, and aesthetics as well as possible social, cultural, and environmental impacts.

Key Concepts

Students should understand more about what the Internet is, what a computer is, and how the Internet affects our daily lives.

Students should develop an improved understanding of the power of the Internet as a positive agent of change.

Students should use collaborative online tools to work in effective groups using good research skills to deliver a worthwhile presentation.

Students describe ways that greater speed, detail and precision in processing information is possible because of computation.


Teacher Resources

Student computer usage for this lesson is: required

Teacher Resources

  1. Unit 1 Lesson 2 LIGHT.pptx (overview of the lesson)
  2. Modern Computerx.pptx (example of a short pecha kucha)
  3. Script for Modern computers.docx
  4. Bad presentation for contrast.pptx (example of how NOT to create a presentation)
  5. Script for bad presentation.docx
  6. Research and Collaboration Assessment.docx
  7. Pecha Kucha student handout.docx
  8. Pecha Kucha Assessment.docx

Student Resources:

  1. Access to computers for using online collaboration resources.

Crowdsourcing Resources:

 

Lesson Plan

Session 1

Getting Started (5 min)

Journal 

Instruct students to think about the following questions and journal about their thoughts. Afterwards, have them pair up and share their answers with each other. (See slide 2 of the presentation in the lesson folder: "Unit 1 lesson 2 LIGHT".)

  • How big is the Internet?
  • What kind of information is on the Internet?
  • What kinds of communication does the Internet make possible?

Teacher Overview and Student Activity Introduction (20 minutes)

(Use the Unit 1 Lesson 2 LIGHT presentation for this activity.)

Part 1 - Teacher Presentation and discussion (10 min) 

  1. Use slides 3-4, and the students' ideas from the journaling exercises, to guide a class discussion on the Internet: what is out there and how does it affect our lives?
    • Try to get an idea of how much students know about what is on the Internet beyond email and social media.
    • If students need more idea starters, show the presentations on Communication Changes or Business Changes in the teacher folder.
    • Encourage students to continue to write down the things they know or could look up.
    • Suggestion for follow-up activity: Have students create "memes" and try to spread them through social networking to see the power of communication and collaboration.
  2. Slides 5-7: Introduce the question of what a computer is. Then, using the script in the teacher folder, deliver the pecha kucha presentation on Modern Computers. Finally, discuss with the students what their assignment will be and give them some tips for creating their own presentation.                          
  3. Notes for teachers on presentation: 
    • "Pecha kucha" was originally used to refer to a specific talk format that contains 20 presentation slides, each of which are presented for exactly 20 seconds, using an auto-advance timer.  The goal is to create a tight, effective presentation that moves quickly and conveys a lot of information in a short period of time.
    • For this exercise, you will be demonstrating a "half pecha kucha" that includes 10 slides -- presented at 20 seconds a slide, the presentation will last for 200 seconds (just over 3 minutes).
    • You will need to practice this presentation ahead of time, especially if you are not familiar with the "pecha kucha" format!   

Part 2 - Introducing Student Activity (10 min)

  1. In the remainder of the lesson, student groups will create their own "half pecha kuchas" on a topic about the Internet that they select.
  2. Ask students what they learned:
    • About the content: modern computers.
    • About delivering a pecha kucha presentation: you need a script; you need to practice; it's automatically timed; you don't read from the screen.
  3. Slides 8-10: Tell students they will be working for the next few days to create presentations about the Internet. Encourage some brainstorming of good questions to ask and write them down.  (Slides 9-10 illustrate how this was done for the Modern Computer pecha kucha. Slide 11 includes some tips on doing good research. Lastly, slide 12 introduces the criteria that will be used to assess the presentation.)
  • As you are doing this, give students the "Pecha Kucha Student Handout."
  • Have students consider what online collaborative platforms are available to them to create a product together (Office 365, Google Drive, etc.)
  • Note: If your students need more clarification on making a good presentation, you may want to deliver the "bad presentation for contrast" presentation (in the lesson folder, along with corresponding scripts) and have them describe why the presentation is bad.

 

Group Activity: Collaboration and Organizing Ideas (30 minutes)

(See Research and Collaboration Assessment Rubric.) Since this is the first significant collaborative activity of the course, discuss team dynamics and norms, communication skills and conflict resolution, in addition to an overview of what online collaborative tools can be used.

Assign students to investigate and use online collaboration tools to:

  • Collect the best questions on what they will research (Google docs, Office 365, etc.).
  • Create a mind map to organize the questions. MindMup is recommended for creating the mind maps because it requires no signup. A list of tools is available here: http://elearningindustry.com/the-5-best-free-mind-mapping-tools-for-teachers
  • Collect images and links to research on platforms like Pinterest, Google drive, or links in a document. (There are many other options.)

Session 2 - 3

Group Activity: Research and Presentation Preparation (65 minutes)

Part 1 - Preliminary research and collaborative development of pecha kuchas on the impact of the Internet (20 min)

Part 2 - Preliminary presentations/sharing and feedback (10 min)

Part 3 - Research and collaborative development of complete pecha kucha presentations on the impact of the Internet (35 min and homework / out-of-class time as desired)

Class Activity: Presentation of Research (20 min)

(See the self and group assessments and "Pecha Kucha Student Handout" in the lesson folder.)

  • The timing for this session assumes that there are 4-5 group presentations, each in the pecha kucha 3.5-minute format.  
  • Every student should present some of the slides; the assessment includes both individual and group components.
  • Give feedback and get comments about the advantages of working as a team, highlight teams that demonstrate good teamwork skills. 

 

Wrap up (10 min)

Share Student Learning

  • Review knowledge gained from student presentations about facts learned, the research process, collaboration, and presentation skills.
  • Ask how each student was able to reflect their own, personal ideas as part of a collaborative group.
  • Discuss how computation facilitates the creation and modification of computational artifacts with enhanced detail and precision.


Options for Differentiated Instruction

  • Suggestion: Have students create memes and try to spread them through social networking to see the power of communication and collaboration.

Evidence of Learning

Formative Assessment

Teachers are encouraged to have students present single slides and give each other feedback before continuing to do the research for the complete presentations.

 

Students are working in collaborative teams for the first time, use reflections and dialog to assess how effectively they are using online tools to collaborate and how they are resolving issues working as a team.


Summative Assessment

Students create a presentation while working in groups and using online collaboration tools. A rubric will be used to assess the student group presentations along with self-reflections. 

Lesson Summary

Pre-lesson preparation

For better comprehension of the lesson, students should have ideally had experiences or have read about issues that have demonstrated how computing can be misused. This does not require assigned reading or review (just encourage them to watch the news and notice what is happening in the world), but you could have them bring in a current event article and summary of the event for homework as additional preparation.

Summary

Students will read about and discuss the issues that arise from the misuse of technology. Over the two sessions, students will assess their current uses of computers for communication.  In the second session, they will narrow their focus to address as a class social media, online retail and banking, cloud data storage, and government surveillance.

Outcomes

 

  • Students will understand the consequences of Internet usage on personal privacy and security.
  • Students will become aware of technologies designed to track their Internet usage.
  • Students will understand the benefits and drawbacks of street cameras and facial recognition software.
  • Students will understand both sides of the argument about government surveillance of electronic communications.

 

Overview

Session 1

 

  • Getting Started (5 min) – Journal about current uses of online communication.
  • Activity (40 min) – Working in pairs students review a list of 10 Commandments of Computer Ethics and develop a revised version.
  • Wrap up (5 min) – Combine partners into groups of four and assign to each group one of the following topics to be researched tomorrow.
  • Social media (+ connecting at a distance, - cyberbullying)
  • Online retail, banking, and businesses (+ convenience, - identity theft)
  • Cloud data storage (+ information sharing, - loss of privacy)
  • Government surveillance (+ find terrorist threats, - loss of privacy)
  • Begin researching  the assigned topic.

 

 

Session 2

 

  • Getting Started (5 min) - Journal on assigned topic
  • Activity (10 min) -Research groups
  • Activity (30 min) - Regroup and share information gathered
  • Wrap up (5 min) - Select one topic to explore further

 

 

Learning Objectives

CSP Objectives

Essential Questions

  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: required

These materials may be useful if you want to spend some time with the entire group discussing a few key topics.

Lesson Plan

Session 1

Getting Started (5 min) - Journal

The purpose of this session is to make students think about the different ways in which they as individuals use computers and the Internet to communicate.

Guided Activity (40 min)

For this activity, teachers will use partners.  If an odd number of students then a group of three may be used.

 

  • Students work in pairs to examine Wikipedia article, “Ten Commandments of Computer Ethics” (http://en.wikipedia.org/wiki/Ten_Commandments_of_Computer_Ethics) and identify and share the two commandments they think are the most commonly violated.
  • Students read commandments and individually identify the two they think are most frequently violated.
  • Students share the two commandments they identified with partners and discuss why they choose the commandments they did.
  • Pairs select two they think are the most significantly violated.  Collect the responses from the class.

 

As a class suggest revision to the 10 Commandments of Computer Ethics.

 

  • Divide the class into four groups. Each topic group will work together to explore resources and prepare to share with the other groups tomorrow.
  • Groups use the worksheet (ExploringInnovationsWorksheet.docx) to identify and record
  • potential impacts of the technology,
  • whether they primarily affect individuals or society as a whole, whether they are positive or negative,
  • evidence of that impact
  • the source they used to find the information.  

 

(Each student in the group should make their own copy of the worksheet, so they can bring them back to their original jigsaw groups.)

After completing the worksheet, students should complete the Venn diagram (ExploringInnovationVenn.docx) to summarize key impacts of an innovation.

The topics (and examples of positive (+) and negative (-) impacts) include:

 

  • Social media (+ connecting at a distance, - cyberbullying)
  • Online retail, banking, and businesses (+ convenience, - identity theft)
  • Cloud data storage (+ information sharing, - loss of privacy)
  • Government surveillance (+ find terrorist threats, - loss of privacy)

 

For each of the above topics, there is a resource sheet in the lesson folder that can be provided to student groups. (Optionally, you may want to create additional resource sheets, or let students select other topics and find their own resources.)

Wrap Up (5 min)

Each group should discuss its progress this far in researching their topic.  Students will have 10 minutes tomorrow to prepare to make a presentation to the resto of the class.

Session 2

Getting Started (5 min)

Students should take a few minutes to journal about the following prompt:

 

  • Think about your typical day. How often do you think that your image has been captured by a surveillance camera? List all of the places where your image may have been captured.  Also, consider what you have done in the past week. What data might have been collected about you somewhere over the past week?

 

Guided Activity (10 min)

Topic Groups: Have students briefly assemble into topic groups to compare notes.

Guided Activity (30 min)

 

  • Jigsaw Groups: Have students assemble into their original jigsaw groups. Each member will present the information on the topic that was researched. All notes need to be shared within these groups.
  • You may regroup and discuss the topics as a class if time permits.

Wrap Up (5 min)

Each student should select a topic that they would like to explore further and write the topic in their journal. It might be a narrow subtopic from the broader topics that were explored within this lesson. They might also want to write down a few interesting innovations connected to a topic. They will refer back to this during the practice performance lesson later in the unit.

 

 


Lesson Summary

Summary

A bit is a single unit of information. Bits are the fundamental building blocks of digital computing.  There are many different ways to represent a single bit physically, and collections of bits can be combined to represent everything from numbers, to electronic books, to control programs for interstellar probes. In this lesson, students will learn how bits are stored and how they can be used to represent information. Students will further explore how numbers can be represented in binary form, how to convert numbers between these different forms, and how they are used by different applications.

Outcomes

  • Understand the abstraction of a "bit" and how bits can be used to represent different kinds of information.
  • Be able to convert numbers between decimal, binary, and hexadecimal forms.
  • Be able to identify formats used to represent numbers, pictures, audio, and video data.
  • Understand how these forms of bit representation are used in modern technology.

Overview

Session One

  1. Getting Started (5 min) - Jacquard loom
  2. Guided Activity (10 min) - Light bulb abstraction of bits
  3. Interactive Teacher Presentation (25 min) - "It's Just Bits"
  4. Wrap Up (10 min) - Binary conversions worksheet

Session Two 

  1. Getting Started (5 min) - Journal and completing worksheet
  2. Guided Activity (20 min) - Conversions (two options: Binary Game or hexadecimal conversions)
  3. Real-World Connections (20 min)
  4. Wrap-up (5 min) - Journal

Optional Activities

  • Homework - Generate conversion worksheets using http://www.worksheetworks.com/math/numbers/systems.html 
  • (30 min) Web-quest to explore different ways of physically representing bits.
  • Four research activities on:
    • Charles Babbage and Ada Lovelace
    • Hollerith's Tabulation Machine
    • Qbits
    • Weaving with the Jacquard Loom

Source

Parts of this lesson were adapted from code.org.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core Math:

  • N-Q.1-3: Reason quantitatively and use units to solve problems

Common Core ELA:

  • RST 12.1 - Cite specific textual evidence to support analysis of science and technical texts, attending to important distinctions the author makes and to any gaps or inconsistencies in the account.
  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.8 - Gather relevant information from multiple authoritative print and digital sources, using advanced searches effectively; assess the strengths and limitations of each source
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

The students will...

  • Understand the abstraction of a "bit" and how bits can be used to represent different kinds of information.
  • Be able to convert numbers between decimal, binary, and (optionally) hexadecimal forms.
  • Be able to identify formats used to represent numbers, pictures, audio, and video data.
  • Understand how these forms of bit representation are used in modern technology.

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How can computational models and simulations help generate new understanding and knowledge?
  • How are number values converted across decimal, binary, and hexadecimal representations?
  • How are digital colors represented with hexadecimal codes?
  • What is the algorithm to convert a number to or from hexadecimal with another number system?

Teacher Resources

Student computer usage for this lesson is: required

For the Student

  • Journal
  • Option: Access to a web browser with Flash to play the Binary Game: http://www.crazygames.com/game/binary-game
  • Option: Access to a web browser and collaborative file creation/sharing site, such as Google Documents, to complete a web quest 

For the Teacher

In the Lesson Resources folder:

  • Presentation: JustBits
  • BinaryConversionWorksheet
    • Give these directions to students during the lesson
  • AdditionalResource_bin2dec
  • AdditionalResource_BinaryWorksheet
  • AdditionalResource_binmagic
  • For Lecture:
    • HexBinaryExamples
    • HexDecimalExamples
  • Hexadecimal worksheets:
    • Worksheet: HexConversionsWorksheet
    • Homework: HexConversionsHomework
  • Answer Keys:
    • HexConversionsWorksheetKEY
    • HexConversionsHomeworkKEY

Available on the Web for Teachers:

Lesson Plan

Session One

Getting Started (5 min)

Jacquard loom: early computer programming

The teacher will introduce the "Jacquard Loom," an early machine that made use of punch cards to make complicated textiles.

  • View the video: http://www.youtube.com/watch?v=lwozgRPLVC8 (2:35) Summary: Developed in 1801 by Joseph Jacquard--this loom used punch cards to structure a series of operations. This loom is considered to be an important to the development toward computer programing.
  • If you have punch cards, pass them around while students are watching the video.

Guided Activity (10 min)

Represent Values as a Light Switch

  1. Instruct students to answer these questions with an elbow partner:
    • Using a single light switch, how can you represent the value 0? 1?
    • If you have two light switches (connected to two different lights in the same room), how many values can you represent? Describe how you would represent each value (numbers, symbols, etc.).
  2. Invite students to share their ideas with the class.
  3. Engage the entire class with the following questions. Show the various combinations.
    • If I add a third switch, how many values can I represent?
    • How many values can I represent with four switches? Do you notice a pattern?
    • What is the minimum/maximum values that can be represented with a fixed number of switches? Make the connection: when the computer stores values as on/off switches it can store a range depending on the number of bits (light switches) from all off (0's) to all on (1's)

Teaching Tip: Guiding the students toward understanding that the number of switches determines how many numbers can be represented. The pattern is 1 switch = 2 (or 21) numbers, 2 switches = 4 (or 22), 3 switches = 8 (or 23), etc.

Interactive Teacher Presentation (25 min)

Use the "JustBits" presentation in the lesson folder to explore different ways to represent bits, and different ways in which bits can be used to store different kinds of information.

General Presenting Tips:

  • Throughout the presentation, the slides have questions on them that the students should be thinking about. Try to ensure that students are actively considering these questions and that they understand how to answer them before moving on.  
  • You may wish to call on students randomly, have everyone write down an answer, or have students suggest different answers that you write on the board and then have the class work on.  (Note: Incorrect answers are a great opportunity to diagnose and remedy conceptual errors. Remember, there are no "bad answers," just ones that reveal different levels of understanding.)

Presentation Guide:

  • As you go through the slides, discuss how the different uses of bits relates to the representation of bits. Eight bits can be interpreted in many ways:  as an unsigned integer from 0 to 255, as a signed integer from -127 to 128, as a single ASCII character, or as a red, green, or blue color value associated with a pixel in a screen display.
  • Emphasize to the students that a "bit" is just an abstraction. It refers to the value of a single piece of information stored in an "on/off", "zero/one", or "yes/no" format.  Similarly, any given interpretation a collection of bits as information is an abstraction that lets us move from "a bunch of bits" to "data and information."  
  • Slide 5 (Storing Bits): If you are planning to do the optional web quest to explore different bit representations, you could encourage students to think about different ways that bit could be stored, to get them thinking about that question.
  • Slide 11 (Conversions): This is a fairly quick introduction to binary/decimal conversions.  You may wish to spend some time at the board working through more examples.  Students will have an opportunity later in the class to use the "Binary Game" (or optionally paper worksheets) to practice binary/decimal conversion.
  • Slide 12 (Hexadecimal): For hexadecimal number conversions, you may wish to spend a bit of extra time on this slide to make sure they understand the concept more clearly.
  • Practice Problems, Slide 18: Give the students a few minutes to start working on the first problem, then lead the class in a brief discussion to make sure they’re approaching it correctly.
    • They should be multiplying the number of pixels (600 * 400 = 240,000) by the number of bytes (3 bytes in a pixel) by the number of bits in a bite (8 bits in a byte).
    • The total number of bits = (240,000 * 3 * 8) = 5,760,000 bits.
    • CD answer: 44,100 samples/second * 16 bits/sample = 705,600 bits/second.
    • One 3-minute song = 705,600 bits/second * 60 seconds/minute * 3 = 127,008,000 bits. 
  • Slide 19: Represent data and instructions in binary. Possible answers could use 4 bits per number and 2 bits per operator such as ( 00 for +, 01 for -, 10 for *, 11 for /) as follows: 
    • 9 + 4 as 1001 00 0100

    • 11 – 3 as 1101 01 0011

    • 2 * 5 as 0010 10 0101

    • 15 / 5 as 1111 11 0101

 

Wrap Up (10 min)

Converting between decimal and binary

Use the "BinaryConversionWorksheet" in the lesson folder (from Code.org) to let students explore (individually or in pairs/small groups) how to build an algorithm for converting binary to decimal. As you progress through the activity, answer questions as they arise, or ask students to explain how they arrived at the answer to check for understanding.

Other extensions and activities that may be useful:

  • List the numbers from 0 to 15. Show students how they are represented in binary. Practice representing the grade level of various students in binary.
  • Show an algorithm for converting binary to decimal.
  • Show an algorithm for converting decimal to binary.
  • Convert an IP-V4 address from decimal to binary.

 

Session Two 

Getting Started (5 min)

Introduction

  • Have students describe what they know about representing numbers in binary code from the previous lesson (journal or discussion). (You may want to put a few conversion problems on the board as an entry check.)
  • Complete any remaining problems in the "Student Activity Guide: Converting Decimal to Binary."

Guided Activity: Conversions (20 min)

Option 1: 

Option 2:

  • If your students are comfortable with binary/decimal conversions, you could have them also master hexadecimal conversions.  (See "HexBinaryExample"s and "HexDecimalExamples" in the Lesson Resources folder for specific directions and suggested examples and/or the PowerPoint slides in the lesson folder.)
  • You may want to add additional examples or have students come to the board to show their work as you go through the different types of conversions.  (See the "HexConversionWorksheet" for distribution of those additional practice problems done during class.)

Extension: If you want to give your students more practice problems for in-class practice or homework, you can use the worksheet generator at http://www.worksheetworks.com/math/numbers/systems.html

Real World Connections (20 min)

How are text, colors and images saved in hexadecimal format? Select some of the following to present and discuss with the class.

  1. How is text converted to hexadecimal format?
    Ascii to Hexadecimal conversion chart
    Text to hexadecimal conversion tool - http://www.string-functions.com/hex-string.aspx

  2. Where are hexadecimal numbers used to represent digital data? Colors!
    Color Conversion Website: http://rapidtables.com/convert/color/index.htm

  3. How are picture files saved with hexadecimal format?
    http://www.colorcodepicker.com/

  4. Color Chart of 216 Web-safe Colors in hexadecimal form - http://www.w3schools.com/html/html_colors.asp
  5. Floating point numbers (decimals/fractions) are also represented in binary. Challenge students to think of how 2.5 would be written in binary (place values are in powers of 2, so to the right are 2-1 (one half), 2-2 (one quarter), 2-3 (one eighth) etc. So, 2.5 decimal = 10.1 binary ; 3.25 decimal = 11.01 binary; 4.75 decimal = 100.11 binary. See if they can figure out the pattern. Notice that 1/10 is impossible to represent accurately this way, causing any number of complications.

Wrap-Up (5 min)

Journal

Students should consider the following prompt, and record their thoughts in their journals:

  • Why is the abstract idea of an image stored in a jpeg file useful even though it hides important details about the actual file format?  When a user takes a digital photograph, they capture a digital image in their camera. Assuming the pictures are in the jpeg format, explain the difference between the abstract idea of an image and what is actually stored by the camera. 
  • Alternative question: Now that you have seen hexadecimal, what other number systems might be useful in computer science?  Give advantages and disadvantages of each. 

Optional Activities

Activity 1 - Collaborative Web-Quest (20 min)

Part 1 - Exploring Physical Bit Representations

  • Group students into small teams. Assign each team to research how computers represent bits with one of the following:
    • Punch cards
    • Magnetic polarity
    • Electrical voltage
    • Light intensity
  • Students can record their findings in a common file such as a Google doc, so that all students can edit and see the combined results of the research. Encourage students to create and/or add images that more completely illustrate what they have learned.

Teaching note: The research and writing activity in this lesson presents an opportunity to talk about copyright laws and emphasize that copied content must be credited to the rightful author or organization. 

Part 2 - Sharing the research

  • Allow students in each group to briefly share the most important details about what they learned about their assigned topics. If more than one group researched the same topic, they can report to the class as one team.
  • Encourage the class to ask questions.
  • Ask students if they know of any additional ways to represent bits.

Teaching note: Model writing skills through a variety of writing opportunities and prompts. Encourage students to write complete sentences that clearly communicate their ideas.

 

Activity 2 - Charles Babbage and Ada Lovelace

  • Have each student research the machines designed and programmed by Charles Babbage and Ada Lovelace. How did these machines represent bits? Investigate Babbage's and Lovelace's intellectual roles in creating their designs.
  • Communicate your learning in any effective format. Consider images, a collage, a recording, a screen play script, or a compare-and-contrast chart of the contributions to computer science of both Babbage and Lovelace.
  • Student should prepare to discuss their findings with the class.

Activity 3 - Hollerith's Tabulation Machine

  • Have each student research the machines that were designed by Herman Hollerith. How did these machines represent bits? What was the purpose of the machines? How did his device change history?
  • Predict how history might have been different if Hollerith hadn't created this device.
  • Student should prepare to discuss their findings with the class.

Activity 4 - Learn about Qbits

  • Have each student research "Qbit" and how it is used in quantum computing. Be particularly attentive to the vocabulary used to describe this technology. What implications does it have for the future of computing? Report your findings in any effective format.
  • Student should prepare to discuss their findings with the class.

Activity 5 - Weaving

  • Have each student create a small weaving project by following the directions shown in the video about the Jacquard loom:
  • Students respond to this prompt in their journals:
    • How did the invention of the Jacquard weaving loom change society? (consider technologically, economically, socially) Compare these changes to those brought by a recent innovation in computing technology. Be sure to speculate on the long-term impact and significance of these inventions.

Options for Differentiated Instruction

The Extension section above gives a variety of outside activities, some of which are appropriate for verbal and others for tactile learners.

  1. Instead of flashlights, the same task can be done with large cards that are black on one side and white on the other.
  2. If you have the space for a physical activity, have two (or more) teams (of 4 or 5 students each) line up.  
    • Each student represents a bit, with the student on one end being the bit in the 1's place, the next student representing the 2's place, the next the 4's place, etc.   
    • The students start in a standing position, which represents neither 1 nor 0. To represent a 1, the student's arms must be stretched straight overhead; to represent a 0, the student must squat down.  
    • You then call a number (one that can be represented using that many bits).  The two teams then race to get their team to represent that number. The first team to have it correct gets a point. They normalize (all stand with no arms up) and a new number is called.  
    • Ask them about patterns they find during the game.  (The 1's place student should notice that if the number is odd, their arms are up, but if the number is even, they are squatting.  The student representing the highest bit should notice that their arms are up if the number is larger than or equal to their place value.)

Note: If there are students in the class with physical limitations who are unable to stand, stretch, or squat, the game can be modified appropriately: 

  • Have the students play the game seated, with a card in their lap. (It represents neither a 1 nor a 0 when in their lap.) They will hold up a black side (to represent 0) or a white side (to represent 1) when a number is called.

 

Visual - Decimal, Binary, Octal, and Hexadecimal Number Systems Video -   http://whyu.org/whyUPlayer.php?currentchapter=3&currentbook=1&youtubeid=5sS7w-CMHkU

OR - https://www.youtube.com/watch?v=_oaBT-TndCs

Kinesthetic - Hexadecimal Drum Machine - http://www.mathsisfun.com/games/hex-drums.html 

Auditory - Hexadecimal File Music - https://www.youtube.com/watch?v=fyBf4Y2mVzs

Extension Activity 1. Students that have mastered the conversion techniques can peer-tutor students [one-on-one] that are having difficulty solving the conversions.

Extension Activity 2. Students can observe their computer’s network interface card (NIC) MAC address in hexadecimal, and convert the MAC address to binary and decimal. 

See algorithms of number system conversions:

      - http://www.schooltube.com/video/04a13760ada644a2a7d4/Bin2Dec2Hex%20-%20Lesson%203%20-%20Converting%20a%20hexadecimal%20number%20to%20binary

 

 

Alternative presentation for Gifted Students doing Decimal to Hexadecimal Conversion:

For decimal number x:

  1. Get the highest power of 16 that is less than the decimal number x:

  2. 16n < x, (n=1,2,3,...)

  3. The high hex digit is equal to the integer if the decimal number x divided by the highest power of 16 that is smaller than x:

  4. dn = int(x / 16n)

  5. Calculate the difference Δ of the number x and the hex digit dn times the power of 16, 16n:

  6. Δ = x - dn × 16n

  7. Repeat step #1 with the difference result until the result is 0.

Example

Convert x=603 to hex:

n=2, 162=256 < 603

n=3, 163=4096 > 603

So

= 2

d2 = int(603 / 162) = 2

Δ = 603 - 2×162 = 91

= 1, x = Δ = 91

d1 = int(91 / 161) = 5

Δ = 91 - 5×161 = 11

= 0, x = Δ = 11

d0 = int(11 / 160) = 1110 = B16

Δ = 11 - 11×160 = 0

(d2d1d0)  = 25B

Answer: x = 60310 = 25B16

 

Learn to Count in Binary and Hexadecimal - http://webelfin.com/webelfindesign/counthex.html

 

ADDITIONAL/ALTERNATE FORMATIVE ASSESSMENT MATERIAL or Class Activity if time permits - from unplugged.com

http://csunplugged.org/binary-numbers

Brainstorm reasons for storing and communicating secret messages.  Challenge students to think of both helpful and problematic reasons.  Students record at least two of each.

View steganography presentation.  Presentations are available on YouTube.


Evidence of Learning

Formative Assessment

Assessment Questions:

  • Describe the pattern for even and odd numbers that you see in the binary number system. Speculate on why this pattern exists.
  • Why is the binary number system used in computers?
  • Why is the Jacquard loom important in the history of computing?
  • How are bits represented in punch cards?
  • How are bits represented magnetically?
  • How are bits represented with voltage?
  • How are bits represented with light?
  • Are students correctly answering questions in the Getting Started activity: Represent values with a light switch? On the Student Activity Guide: Converting Decimal to Binary?
  • Decimal, binary, and hexadecimal value conversions:
    • Write the step-by-step process needed for the following number conversions:
      • hexadecimal to binary
      • binary to hexadecimal
      • hexadecimal to decimal
      • decimal to hexadecimal
    • Assign a sequence of consecutive hexadecimal numbers - one to each person.  After they have converted them to decimal and to binary, have them compare to find patterns in their answers.
    • Distribute worksheets so all students practice conversions of all types.  See "BinaryConversionWorksheet" and "HexConversionWorksheet"

Summative Assessment

Journal check - questions presented as described in the lesson plan

ASSESSMENT QUESTIONS

  • Why is the binary number system used in computers?
  • Describe the pattern you observe for even and odd numbers in binary. Why do you think this pattern emerges?
  • What other patterns do you see in binary numbers?
  • Convert the ages of your family members to binary. How many bits are needed to express the ages?
  • Describe an algorithm for converting decimal numbers to binary.
  • Describe an algorithm for converting binary numbers to decimal.

Getting Started section: questions on converting between bases and describing the purpose of hexadecimal numbers.

Lesson Summary

Summary

Computing innovations have the potential to significantly impact our lives, both positively and negatively.  In order to understand the full range of impact (or lack of impact) of a given innovation, one must consider how differences in geographic location, culture, and socioeconomic status influence the effect that given innovation has on a specific group of people.  Students learn about the digital divide on national and global levels and analyze how three different computing innovations impact people, making ethical considerations while doing so in order to determine if the impact is beneficial or harmful. 

Outcomes

Students will:

  • Discuss the ethical concerns that arise from a given computing innovation.
  • Describe the ways in which the digital divide affects individuals and groups of people.
  • Analyze the impact of a given computing innovation with respect to a specific group of people and categorizing the impact as beneficial or harmful.

Overview

  1. Getting Started (5 min)
  2. Guided Presentation (20 min)
  3. Independent Analysis (20 min)
  4. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP3: Construct viable arguments and critique the reasoning of others.

Common Core ELA:

  • RST 12.1 - Cite specific textual evidence to support analysis of science and technical texts, attending to important distinctions the author makes and to any gaps or inconsistencies in the account.
  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.6 - Analyze the author's purpose in providing an explanation, describing a procedure
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 7. Engaging in argument from evidence

Key Concepts

  • Innovations have positive and negative impacts.
  • The digital divide can significantly influence the impact and utility of a given innovation for different groups of people.
  • The movement towards Open Access and open-source software is decreasing the width of the "digital divide."
  • In order to understand the impact of a given innovation, it is necessary to consider if and how the innovation affects different groups of people in the world and whether that impact is beneficial or harmful to that group.

Essential Questions

  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: optional

For the Student

For the Teacher

In the Lesson Resources folder:

  • Presentation (Lesson1_5)
  • Analyzing Impacts of Digital Innovations Worksheet (Lesson1_5wkst)
  • Homework (Lesson1_5hw)

Lesson Plan

Getting Started (5 min)

Present "Lesson1_5" PowerPoint slides (in Lesson Resources folder).

  • Slide 2: Students will respond to the following prompt in their journals:  List three questions you could ask to decide if an innovation is "ethical".
  • When the students finish, have them discuss their answers.  (Possible answers: does it cause physical, emotional, cultural, environmental, economic or social harm?)

Guided Presentation (20 min)

Analyzing the Ethics of an Innovation (Slides 3 – 10) :

  • Slide 3: Show students the definition of “ethics”.
  • Slide 4: Have students vote as to whether or not “ethical” and “legal” are the same. This is especially relevant with respect to innovations because laws cannot be made about a specific technology before it exists.  I.e. laws governing the use of a specific technology must be made after its emergence. 
  • Slide 5: Present the necessary considerations for analyzing the impacts of an innovation, focusing on the first point about whether or not a given impact is negative or positive.
  • Slides 6-9: Present the background information on Napster and the legal proceedings that resulted from copyright infringement issues. It is important to establish the state of online music sharing/streaming in the late 1990’s when Napster emerged so that students understand the controversy surrounding its creation and implementation. Mention the conflict with the Digital Millennium Copyright Act (DMCA) and how not having access to information/data under the DMCA can be harmful as well as beneficial.
  • Slide 10: Have students analyze whether or not they think Napster was an ethical innovation by writing down the beneficial and harmful impacts of its creation and use.  Slide 11 provides some possible answers to the prompt.

The Digital Divide (Slides 12 - 17):

  • Slide 12: Revisit the necessary considerations for analyzing the impacts of an innovation, emphasizing the second point about geography and socioeconomic factors influencing the impact a given innovation has on a specific person or group of people.
  • Slide 13: Some students have little/no understanding of how other people live in the world and the factors that limit impact or increase the divide among various groups of people based on geography, culture, and socioeconomic status. Have students discuss their thoughts on the factors in a person's life that would cause Napster's creation and use to have no impact.  Slide 14 gives specific reasons as to why a given person would be unaffected by a music-sharing (or any Internet-based) technology.
  • Slides 15-17: Ask students if they’ve heard of the digital divide.  Then present these slides, which define the term “digital divide” and discuss factors that contribute to it in the United States and on a global level.  The slides contain several links and videos to supplement the information:
  • Slide 18: Reducing the Divide (The Open Movement)
    • Discuss the concepts of Open Access, Creative Commons licensing, and open-source software. Ask the students to consider how public access to scientific results improves people's lives and reduces the gap between "haves" and "have-nots".

Independent Analysis (20 min)

For this portion of the lesson, students will be analyzing the impacts of two innovations: artificial intelligence and the Find My Friends App.  A worksheet for this activity (“Analyzing Impacts of Digital Innovations”) can be found in the lesson resources folder (Lesson1_5wkst.docx).

  • Slide 19 (Innovation #1): Students will be watching this video about artificial intelligence (0:00 – 5:12) https://www.youtube.com/watch?v=95KhuSbYJGE .  Point out the example on the worksheet table that has been given as a model of how to fill out the table.  Give students time to fill out the front of the worksheet as they watch the video and a few minutes after watching the video to write down more of their thoughts.  Then share out in groups and as a class.  The specific contents of the video are as follows:
    • Basic assumption: It’s unethical NOT to develop artificial intelligence.
    • Robots that learn, problem-solve, and are creative have been around since mid-20th century.
    • People are threatened: why hire people if you can have a robot?
    • Robots for everything: Google self-driving car, Watson going for diagnostic medicine, Perry Mastron for legal needs
    • Robots can do so much: not just boring, repetitive, dangerous, but also complex thinking jobs
    • Is it ethical to stop improvement? The ethic of truths: we need things like cheaper, better medical care.
    • The printing press challenged the status quo. Old inventions caused problems, too.
    • Ethics of progress: does the possibility of atrocity (nuclear bomb) mean we shouldn't develop nuclear power?
    • Is it unethical to stop the development of artificial intelligence?
    • (STOP at 5:12) after that it’s about emotion. (skip it)
  • Slide 20 (Innovation #2): Have students fill out the back of the worksheet as they read the article about the Find My Friends App: http://www.news.com.au/technology/gadgets/these-smartphone-users-share-how-tracking-app-find-my-friend-has-saved-them/story-fn6vihic-1226752063613 (If doing this lesson without a computer, you’ll need to print out copies of the article for students to read.)  Allow students to discuss their findings with a partner or in groups.  Get a few responses from groups if time permits.

 

Wrap Up (5 min)

  • Slide 21: Students journal about the following prompt: If you come up with an innovation that solves a problem, what concerns do you need to consider before releasing it to the world?  (Possible answers: Whom will it benefit or harm?  Are there people it won't reach at all?)

Homework:

Students will analyze the innovation of 3D printing in the same manner they did for AI and the Find My Friends App, except they will be finding at least one online source on their own from which to draw their information.  Provide students with the “Lesson 1.5 Homework” found in the lesson resource folder (Lesson1_5hw.docx) and provide them with the instructions given on Slide 22.   

This assignment gives students practice analyzing the impacts of an innovation on their own, as well as attributing facts to a resource and the information to include for that resource for the Explore Performance Task.  (The Explore PT is introduced later in the curriculum.)  The worksheet Lesson1_5hw (in curriculum resources folder) can be used to support students, or they can write this information on a blank piece of paper, etc.  The worksheet does not specify which innovation they are researching, so you could reuse it for future research related to impacts of innovations. 


Options for Differentiated Instruction

For students who require more time for processing and writing down the impacts of AI, show the video a second time (the narrator in the video talks quickly).  

If time is limited, split students up so that half of them are analyzing AI and the other half are analyzing the Find My Friends App.  Have students review their findings with another student who analyzed the same innovation.  Then have them jigsaw (https://www.teachervision.com/group-work/cooperative-learning/48532.html ) with students who analyzed the other innovation to share what they found.

Guided notes would be helpful for ELL or SpED.


Evidence of Learning

Formative Assessment

Journal:

  • Have students respond to the following prompt:
    • If you come up with an innovation that solves a problem, what concerns do you need to consider before releasing it to the world?

Homework:

  • Research the impacts of 3D printing.

Summative Assessment

Explore Performance Task

Lesson Summary

Summary

Previous lessons in the "Your Virtual World" have investigated the impact of computer innovations on society. In this lesson, students will learn how using technology can enhance our abilities to solve larger and broader problems (problem solving). The lesson begins by examining reCAPTCHAs, which most students will be familiar with, but they may not realize how they solve two significant problems.

Outcomes

  • Students will learn how computers are used to aggregate the computational power of individuals to solve large-scale problems through citizen science activities.
  • Students will participate in a citizen science project. Aggregate problem-solving is sometimes called "crowdsourcing."

Overview

  1. Getting Started (5 min) - Think-Pair-Share about reCAPTCHA.
  2. Guided Activity (40 min) - Students examine citizen science and discuss its uses in the scientific community.
  3. Wrap Up (5 min) - Journaling about potential additional uses of mass data collection.
  4. Optional Activities.

Source

This lesson is an adaptation of a Code.org CS-P lesson from 2014.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • WHST 12.1 - Write arguments on discipline specific content

NGSS Practices:

  • 8. Obtaining, evaluation, and communicating information

Key Concepts

  • Distributed computing solutions can be used to solve problems, collect data, assist with collaboration, and assist scientific research.
  • Strategies for effective collaboration and the selection of the right online tools greatly enhance the ability to solve problems.
  • A computer program or its results may be rapidly shared with a large number of users and can have widespread impact on individuals or groups.

Essential Questions

  • How does computing enhance human communication, interaction, and cognition?

Teacher Resources

Student computer usage for this lesson is: required

Lesson Plan

Getting Started (5 min)

Think-Pair-Share: Solving problems with reCAPTCHA

  1. Show an image of a reCAPTCHA (by visiting a website that employs this technology or from an image search).
  2. Direct students to describe for their elbow partner when and where they have encountered this on the web and discuss why it is used. Discuss how quickly a program can be distributed online and make a difference to many people across the world.
  3. As a class, view the video Fight Spam and Save Shakespeare and discuss:
    • What two problems are being solved with reCAPTCHA?
    • How has reCaptcha used the aggregate computing power of millions of people to solve problems in digitizing old books?
    • Have you heard of other aggregate solutions to problems that are currently being solved?
    • Are there other problems you can think of that a strategy of capturing the work of millions of people and their computers might be able to solve? 

Guided Activities (40 min)

Part 1 (10 min) - Learn about tracking birds with citizen science

Part 2 (15 min) - Participate in citizen science 

  • Direct students to the Zooniverse website: https://www.zooniverse.org/#/projects 
  • Allow students to participate several times. Encourage them to pick a different project each time.
  • As a class, briefly discuss how the student responses will help scientists.
  • Discuss with the class the components of citizen science.
    • A problem to be solved. (How can a computer be used to identify objects? How can a program learn about those objects?)
    • A way for people to participate. (Create data for identifying objects, ex: Plankton)
    • A website or app to aggregate data. (The Zooniverse website)
    • A way to turn the data into knowledge. (Students can brainstorm possible algorithms to handle the data captured.)
  • Ask students if they know of, or can find, other citizen science projects (an Internet search will turn up dozens, possibly some in your area).
  • Describe how effective collaboration can be with people you do not even see and the exponential improvement of performance when an entire crowd shares the work. 
  • Optional: have students work for 5 minutes in a group to identify the components of a selected citizen science project. Have each group share their ideas with the class.
  • Engage students in a discussion of problems that they think a citizen science project could address using computers to harness the power of data from many individuals.

Part 3 (15 min) - Guessing what you are thinking

Play an on-line game which aggregates human information. (Direct students to Akinator.com or 20Q. If these website do not work on student computer, teacher can display the website and students participate as a whole class.)

  • Discuss how the game acts intelligently.
  • Have students work in small groups to devise a method to collect data to teach a computer how to play 20 questions. Each group should share their ideas.

Wrap Up (5 min)

In their journals, have students describe a mobile app that uses multiple user input to collect data. Emphasize data collection that would be beneficial to high school students.

Optional Additional Activities

Add knowledge to Wikipedia

The purpose of this activity is for students to contribute their knowledge to the aggregated collection of knowledge known as "Wikipedia."

  • Divide the class into teams of two.
  • Instruct students to think of topics they have some knowledge of: a sport, music, their community, a hobby, or other expertise. Direct them to explore the content on that topic on Wikipedia.
  • Each team should work independently to learn how to modify a Wikipedia page and then add some content to the topic. Encourage students to be independent learners by working to learn how to make edits with as little help as possible from the teacher.
  • At the end of class summarize student learning through a discussion or by summarizing the steps of the Wikipedia editing process in their journals. Additionally, students could collaboratively write a paragraph about how they worked together to complete the task.

Learn about Kickstarter

  • Direct students to research Kickstarter.com. Ask them to choose a current project that they think is worthy of funding and justify that judgment. Suggest that the students think of a project that they would like to see as a good candidate for Kickstarter.

Learn about Waze

Use Search Trends as Predictors 

  • Ask students to learn about how search trends can be used as predictors. They should share what they learned with the class by any creative means.

More Citizen Science

  • Find a citizen science project that is of interest to you. Participate in the project. Report your experiences in any creative format: a report, a diorama, a website, video, etc.

Picture Stitching 

"Picture Stitching" is the practice of blending hundreds of photos to create one huge detailed picture.

  • Investigate the stitched photo of the 365-gigapixel image of Mont Blanc that was created by stitching together 70,000 images http://www.in2white.com/# . 

Evidence of Learning

Formative Assessment

Can students imagine additional possible crowdsourcing or citizen science projects?

How does online collaboration improve problem solving abilities?


Summative Assessment

Sample assessment questions:

  • Explain the dual purposes of a reCAPTCHA.
  • Explain how people can add value to citizen science projects, using several examples.
  • Explain how people can add value to an on-line guessing game. 
  • Create a possible flow chart or description of how data collected online can be used to help computers learn.

Lesson Summary

Summary:

This is the unit assessment for the first unit of the AP Computer Science Principles curriculum - Your Virtual World.  This curriculum provides both a testbank of questions with answers for objective questions, and a sample final unit exam prototype for teacher use extracted from the testbank.  

Outcomes:

  • Students will have demonstrated their learninging in this unit through answers to both objective and essay questions

Overview:

  1. Hand out assessment (2 min)
  2. Students write answers to assessment (46 min)
  3. Collect and grade the assessment (2 min)

Learning Objectives

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • RST 12.9 - Synthesize information from a range of sources
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience
  • WHST 12.5 - Develop and strengthen writing as needed by planning, revising, editing, rewriting
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking
  • 7. Engaging in argument from evidence
  • 8. Obtaining, evaluation, and communicating information

NGSS Content:

  • HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants.

Key Concepts

This assessment ascertains that students have a basic understandings of all the concepts presented in the unit, therefore, all learning objectives are assessed in this unit.


Essential Questions

  • How can a creative development process affect the creation of computational artifacts?
  • How can computing and the use of computational tools foster creative expression?
  • How can computing extend traditional forms of human expression and experience?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Students should be aware of the magnitude of impact on individuals and society that result from technological advancements in computing, as well as the rapid pace of change that occurs because of new developments.

Teacher Resources

Student computer usage for this lesson is: optional

In the Lesson Resources folder:

  • "Unit 1 Summative Assessment Test DATABASE - AP CSP"
    • the compiled Unit Test testbank 
  • "Unit 1 Summative Sample Test student copy- AP CSP"
    • a sample exam
  • "Unit 1 Summative Assessment DATABASE ANSWERS"
    • answer key for the Unit Test testbank
  • "Unit 1 Summative Sample Test ANSWERS- AP CSP"
    • answer key for sample exam
  • The instructor will have to review and develop their own evaluation of the essay questions.

Lesson Plan

Getting Started (2 min)

Make sure each student has a copy of the assessment and the necessary writing instruments.

Independent Activity (46 min)

Allow one 45-50 minute class session to administer this assessment.  

Distribute the Unit Assessment Test, which consists of 25 objective questions and a choice of four essay prompts. (Teachers can instruct students in selecting one or more short essay responses for students to answer, based on teacher preferences and time allotments.) 

Wrap Up (2 min)

Collect all papers from the students.


Evidence of Learning

Summative Assessment

This is the summative unit assessment for Unit 1 - Your Virtual World.  A sample summative test and a testing databank of questions are provided by the curriculum.  (Note that the sample assessment may not be appropriate for some classes, depending on the particular focus that the teacher has taken -- e.g., the sample assessment includes hexadecimal conversions, which are an optional component of Lesson 1-4.)

Lesson Summary

Pre-lesson preparation

Review the Teaching Technical Writing slides to help prepare teaching the topics of research and writing. It may be wise to review citation styles and pick one you want your students to use -- as long as they are consistent, the particular style should not matter. For Session 2, you can print out the Cut it Out activities from the slides for your students if you want them to try for themselves on paper.

Summary

Students will learn the basics of technical writing and research, practicing skills including finding good sources, citing properly, and differentiating between quoting, summarizing, and plagiarism.

Outcomes

  • Students will practice the style and process of technical writing.
  • Students will learn and employ practical writing advice.
  • Students will identify good and bad sources of information.
  • Students will learn the importance of citing sources.
  • Students will recognize there are different styles of citations.
  • Students will quote and summarize from information sources.
  • Students will understand the definition and consequences of plagiarism.
  • Students will differentiate between plagiarism and proper attribution.

Overview

Session 1

  1. Getting Started (5 min)
    • What is research?
  2. Activity (15 min)
    • Finding good sources
  3. Activty (25 min)
    • Plagiarism vs. Quotation vs. Paraphrasing
  4. Wrap-up (5 min)

Session 2

  1. Getting Started (5 min)
    • Who writes?
  2. Guided Activity (40 min)
    • Cutting out useless words
    • Practice assessing written responses
  3. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Common Core ELA:

  • RST 12.1 - Cite specific textual evidence to support analysis of science and technical texts, attending to important distinctions the author makes and to any gaps or inconsistencies in the account.
  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.5 - Analyze how the text structures information or ideas into categories or hierarchies
  • RST 12.6 - Analyze the author's purpose in providing an explanation, describing a procedure
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • RST 12.9 - Synthesize information from a range of sources
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience
  • WHST 12.5 - Develop and strengthen writing as needed by planning, revising, editing, rewriting
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question
  • WHST 12.8 - Gather relevant information from multiple authoritative print and digital sources, using advanced searches effectively; assess the strengths and limitations of each source
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 7. Engaging in argument from evidence
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

  • Research involves finding good sources of information and synthesizing knowledge to convey your understanding to others.
  • Attribution of ideas, information, and quotes is an important facet of research.
  • Plagiarism is a complex unethical practice that is not limited to simply copying language, and softer forms of plagiarism should be understood and avoided. 
  • Differentiating the quality of one source from another can be challenging, and often relies on contextual information (such as author, location, date of publication).

Essential Questions

  • How does computing enhance human communication, interaction, and cognition?

Teacher Resources

Student computer usage for this lesson is: required

Additional resources on the basics of research include the following. Keep in mind that what will benefit students the most for this lesson is to focus on tips and guidelines related to content rather than generic advice like avoiding too many adverbs.

Lesson Plan

Session 1

Getting Started (5 min)

Discussion: What is research?

Refer to the "Teaching Technical Writing" slides in the Resources folder for an overview on technical writing and the process of research as well as advice on teaching those topics.

  • To broach the topic of research and provide some basic definitions, start off with a guided discussion and pose the following questions to your students:
    • What kinds of research have you done before? What exactly did you do? Did you follow a process? What was the hardest part?
    • What is research? What are the steps of research? 
    • Writing a research report is sometimes referred to as technical writing. How does technical writing differ from other kinds of writing, like the kind you might do in an English class?
  • Remind students about the upcoming performance task and the expectations.
  • The first step of research is picking a topic and finding sources, which segues into the next activity. For the purposes of practice, today's research topic is already chosen.
  • A key insight to grasp is the difference between researching for yourself alone and researching to later convey your understanding through writing. When searching for information on your own, you may be satisfied with simpler, summarizing sources such as Wikipedia. However, when you intend to communicate and transmit research to others, you become responsible for its quality. For that reason both the quality of your original sources and attributing them (that is, not plagiarizing) become of paramount importance.

Activity (15 min)

Discussion about good sources of information and what meets that criteria [5 min]

  • As a class, have your students try to list as many sources of information they can think of (up to a reasonable amount). Then ask which of these would be considered "good" sources of information, and why? What criteria make one source better than another? Can they think of a "bad" source of information? What makes it that way?

Finding good sources of information [10 min]

  • Each student receives a copy (paper or electronic) of the "Website Evaluation Guide"
  • Several things to note and keep in mind while using the EasyBib guide:
    • The criteria for evaluating websites are at the end of the guide. Some of the guidelines are vague; you may want to discuss a few precise examples with students.
    • When doing research, the most crucial criteria for evaluating any source are the author's purpose and goal behind writing their article. Why did they write what they wrote? Students should always question an author's motivations while assessing sources (not just as a challenge, but to really understand the author and greater context). Is there some monetary reason for their authorship (which is not necessarily bad) such as they are journalists and it is their job, or they are running a website to support advertisements? Does the author have an immediate or indirect connection to the topic they are covering, such as are they an expert on the topic or an outside observer? Does the author have any potential political or other partisan reason for writing their source?  
    • The lack of a named author or editor is not automatically a mark against a source, depending on the context. Some sources publish good information without a specific author, such as Associated Press articles that lack bylines.
    • In terms of authorship, the EasyBib guide uses examples such as "the author is a journalist" as a positive source in contrast with someone with "journalistic experience" as a negative source. These distinctions are sometimes unclear. While verifiable credentials may help assess trustworthiness of an author, some credentials may be fabricated or otherwise made to appear legitimate. Even verifiable journalists and other authors may be untrustworthy on certain topics or under certain circumstances. Again, the greater context matters. Students should be aware of this possibility and always ask themselves what an author's motivations for writing the given article may be.
    • A website or other source adopting legitimate-sounding names or titles (such as "Encyclopedia") should not factor into positive criteria. Some sources will mislead for advertising or other purposes by taking lengths to appear credible.
    • In terms of "currency" and up-to-dateness, both the context and purpose matter. A news source with an article that is no longer current but was covering news at the time is not necessarily a bad source. Similarly, informative articles that are several years old can still be valid depending on their purposed and topics they cover.
  • Have students review the "Finding sources for your research" handout.
  • A difference that students should keep in mind is the one between content distribution sources and content producers. In the case of a service like YouTube, the site itself is not a source (unless it is an official video from the company) -- the user who originally produces the videos is the source. So the fact that a video on YouTube does not inherently make it good or bad; it depends on the legitimacy of the video maker.

Activity (25 min)

Discussion about quoting, paraphrasing with attribution, and plagiarism [15 min]

  • Use the "Writing Tips: Plagiarism vs. Citation" slides in the Resources folder to aid the discussion and give examples of plagiarism
  • All academic writing requires appropriate attribution. The purpose of citation is multifaceted: it credits the original thinker, it establishes a chain of evolving ideas, and it demonstrates the writer has done a suitable job researching sources. Citing sources properly lends credibility to the researcher and is a necessary persuasive tool.
  • Show or discuss an example citation (ideas: a quote, an in-text parenthetical citation, a citation from a paper's bibliography)
  • Rule of thumb: if you are not the original source of an idea or fact that is not common knowledge, you should cite it!
  • Any sentence you write that relies on an idea that is not your own should be cited. If the whole paragraph is about an idea from the same source, you can place the citation at the end of the paragraph.
  • Discuss the definitions and difference among quoting, paraphrasing, and plagiarizing a source. 
    • Plagiarism is taking credit for someone else's ideas as if they were your own.
      • Plagiarism is dishonest and unethical, and it ultimately undermines the credibility of the plagiarist.
      • The consequences of plagiarism are quite severe: you can be expelled from college, be fired from your job, and even have your degree revoked if you plagiarize.
    • Quotation is taking words verbatim from a source, surrounding those words with quotation marks, and specifically naming who said the quote and when/where.
      • In general, quotes should be no longer than a sentence or two at most.
      • Ideally, quotations should only be used as secondary evidence or to illustrate a point already made in your writing.
      • Quotation is not plagiarism as long as it is properly attributed.
      • Improper quotation (lifting text verbatim without using double quotes and/or stating the original source) is plagiarism.
    • Paraphrasing is taking words or ideas from someone and rewriting or condensing them in your own writing.
      • Try to be as clear as possible when you are paraphrasing to convey the source and what it is you are paraphrasing
      • Paraphrasing can be plagiarism:
        • Near-verbatim paraphrasing (just changing or omitting a few words or swapping in synonyms) is plagiarism
        • Summarizing without citing the source is plagiarism
  • Finish with the examples in the slides

Practice judging plagiarism vs. appropriate citations [10 min]

  • Give your students the handouts for "Examples of Paraphrasing" and "Plagiarism vs. Paraphrasing Exercise" (in the Resources folder) and have them complete it in pairs, groups, or as a class. Go over the correct answers and have them discuss why they labelled each.

Wrap-up (5 min)

Journal Entry

With the time remaining, have students reflect and write in their journal what topics they are considering for their performance task and which sources of information they plan to find first.

Session 2

Getting Started (5 min)

Discussion: Who writes?

Use the "Writing Tips Process and Style" slides in the Resources folder to guide this lesson and begin with the questions and overview on slides 2 and 3.

Guided Activity (40 min)

Interactive Lesson: The Writing Process [20 min]

  • Have your students take notes. Warn them that this will be used in their homework!
  • Continuing with the slides, go over the Writing Process and Style sections
  • For the "Cut it Out" exercises in the slides, you may want to have your students follow along on print-outs of the slides.
  • Continue through the rest of the slides

Group Activity [20 min]

  • Pass the "Assessing Sample Performance Task Responses" handouts to your students.
  • In pairs or groups, have your students complete the first handout, and before moving onto the next one, discuss with a group your decisions on how to assess the writing (the Assessments folder should have an example key)
  • Complete the remaining handouts in the same fashion 

Wrap-up (5 min)

Journal Entry or Homework: two options

Have your students reflect and write responses to one or both of the following:

  • Write in your journal how you think technology and computers have changed research and writing over the past hundred years.
  • Make a bulleted list of 10 writing tips you were taught about today (which you can reuse when writing your performance tasks in the future).

 


Evidence of Learning

Formative Assessment

Session 1 Journal:

  • Have your students reflect and write in their journal what topics they are considering for their performance task and which sources of information they plan to find first.

Session 2 Journal / Homework:

  • Have your students reflect and write responses to one or both of the following:
    • Write in your journal how you think technology and computers have changed research and writing over the past hundred years.
    • Make a bulleted list of 10 writing tips you were taught about today (which you can reuse when writing your performance tasks in the future).

 


Lesson Summary

Summary: Students will complete a practice partial Explore Performance Task by creating an artifact of the student's choosing. This is the student’s first exposure to a CS Principles Performance Task; therefore, this is a guided lesson.

Outcomes:

  • Students will use the Internet to research a technology of the student’s choice and create an artifact to report on the research.

Overview:

Session 1:

  1. Getting Started (5 min)
    1. A quick activity that requires an effective internet search
  2. Activity (40 min)
    1. Critical Reading Skills Activity [15 min]
    2. Brainstorming Activity [10 min]
    3. Practice Task Activity [15 min]
  3. Wrap-up (5 min)

Session 2:

  1. Getting Started (5 min)
  2. Guided Activity (40 min)
    • Work on practice performance task
  3. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question

NGSS Practices:

  • 3. Planning and carrying out investigations

Key Concepts

  • Students will revisit concepts learned in Unit 1 to complete a teacher-guided mini-performance task.
  • The teacher will utilize different reading and writing strategies to assist the students in interpreting a performance task and creating an artifact.
  • Students may need guidance in selecting a format for their artifact. Students should be encouraged to create an artifact using a tool they are already familiar with so the lesson can focus more on research, applying Unit 1 lessons and creativity.

Essential Questions

  • How can a creative development process affect the creation of computational artifacts?
  • How can computing and the use of computational tools foster creative expression?
  • How can computing extend traditional forms of human expression and experience?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • Presentation with sample visual artifacts: artifact.pptx
  • Practice Performance Task Rubrics:
    • CS Matters version (uses 5-point scale): Unit 1 Practice Performance Task Rubric CSM.docx
    • College Board version (uses 3-point scale): Unit 1 Practice Performance Task Rubric CB.docx
  • Practice Performance Task:  
    • College Board version for both Investigate (no longer part of CS Principles), Explore (visual and written artifacts), and Create tasks (for teacher reference only): CS_Principles_Performance_Assessment2014-1-9.pdf 
    • Explore task only (useful for sharing with students): Explore Performance Task.pdf

For the Teacher:

Lesson Plan

Session 1

Getting Started (5 min)

A quick activity that requires an effective Internet search

  • Example: Count your clicks! In as few “clicks” as possible, locate a web site for a physical store within 50 miles of your school where you can purchase a blue laptop bag.

Activity (25 min)

Explore Performance Task - Introduction

  • Each student receives a copy (paper or electronic) of the Explore performance task (Explore Performance Task.pdf) and the CS Matters scoring rubric (Unit 1 Practice Performance Task Rubric CSM.docx). Note: This is the official College Board version, which has not been updated fully for the new version of the rubrics. In particular, the rubric now restricts the permitted file types, and the resource dates in the performance task description are outdated.  Those rubric requirements are more current and should be followed by the students.  Note that the rubric is still likely to change in the future; we have developed a more fine-grained scoring rubric that we recommend using, to give the students more feedback and guidance.  (The College Board rubric uses a 3-point scale; the CS Matters rubric is on a 5-point scale.)
  • Use the provided presentation (artifact.pptx) to give an overview of the requirements for the visual component of the Explore task, and to show the students several example artifacts.  Lead the students in a discussion of how the artifacts do (or do not) meet the requirements in the rubric and task description.
  • Use a variety of pre-reading activities to assist students' understanding of the requirements of the task:
    • Read the section headers.
    • Make predictions of what the students will be doing for the performance task.
    • Notice the structure of the text: introduction and short description, followed by details of the requirements.
    • Make connections between what was learned in Unit 1 with the requirements of the task.
  • Students should read the performance task carefully. Encourage highlighting key terms. If necessary, work with students to transfer the requirements from paragraph form to a bulleted list.

Activity (5 min)

Brainstorming

  1. Students should refer to the topic they chose at the end of Lesson 3. They may either choose this topic to research, or pick another topic from the following choices:
    • Social media 
    • Online retail and banking and online businesses 
    • Cloud data storage 
    • Government surveillance 
  2. If they did not do so at the end of Lesson 3, each student should pick an innovation that connects to the topic chosen. They will research this innovation to create their practice artifact. 

(Limiting the choices will allow students to compare and contrast their final artifacts, facilitate self-assessment, and make it possible to identify exemplars of each option.)

 

Activity (10 min)

Practice Performance Task

Students should begin the practice performance task. (This work will continue in the next class session.) During the class, the teacher should provide guidance to students to stay focused on the outcomes of the task, assist students in breaking down the task into workable steps, and check for students' understanding of the task.

Wrap-up (5 min)

Journal Entry

Give students a few minutes warning before the end of class. With 4 or 5 minutes remaining, have students reflect and write in their journal a verbal snapshot of the artifact they are creating.

Session 2

Getting Started (5 min)

  • Have students write a goal for the class period in their journal. "During this class, I will complete: ..."
  • Spend 2 or 3 minutes discussing difficulties encountered the previous day and possible solutions.
  • As students work, have them consider these questions that they will write hour answers to at the end.
    1. What novel combinations of artifacts, tools and techniques can you use to create your artifact?
    2. How does this artifact express your own creativity and interests?
    3. Consider a web page, poster, sound byte, video or picture as a way to communicate your information. If you were to expand on this project, which would you choose and why?
    4. What tools would you use if you had a week to create a larger project? Do you know how to use all of these tools: text editor, spreadsheet to create charts and graphs, web page design, app or computer program creation tool?

Activity (40 min)

Practice performance task

  • Students continue work on the practice task. Continue providing guidance. 
  • Note: This practice task may need more than two class periods to complete. It may be necessary to break the task into chunks and assign some portions for homework. It would also be beneficial to spend class time after completion to have students present their artifacts to the class, identify exemplars, and discuss lessons learned.

Wrap-Up (5 min)


Options for Differentiated Instruction

Some students will benefit from having a teacher-selected topic and a step-by-step plan for completing the task.


Evidence of Learning

Formative Assessment

While the students are completing the performance task, check for understanding by asking the students:

  • What technology are you researching?
  • What artifact will you be creating? What is your plan?

Summative Assessment

The artifact from this Practice Performance task and a reflection on the creative process can be used as a summative assessment using the rubric in the Teacher Resources

Lesson Summary

Summary

Students will be introduced to programming for the first time. They will learn about computer science, computing for good, some of the potential outcomes of programming, and the definition of abstraction.

Outcomes

  • Students will learn various creative and helpful purposes for programming.
  • Students will learn about abstraction.
  • Students will create Python code in Runestone.

Overview

  1. Getting Started (5 min)
  2. Guided Activities (40 min)
    1. Activity 1: Computing for Good [15 min]
    2. Activity 2: Coding with Python in Runestone [25 min]
  3. Optional homework: Read and write a tweet about one of the Seven things you should know if you’re starting out programming [10 min]

Learning Objectives

CSP Objectives

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

Key Concepts

Students must understand that stereotypes of computer programmers are not accurate, and that 'coding' is something everyone can learn to do. Computing can be a creative expression and used for good.

Possible misunderstandings: The term NGO is used in the article Programming for Good: The Story of Code for India, without explicitly defining it as Non-Governmental Organization. 

Abstraction is a tricky idea. Python allows us to describe what we want to do such as "print" and "input" because it provides the details that explain to the computer how to accomplish the task of taking many keypresses followed by a press of the Enter key to allow the computer to store the information we entered, and also knows how to take information stored in the computer's memory and cause it to appear as a series of recognizable dots on the screen using print. Computer programs use input, output, processing and memory.


Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • What opportunities do large data sets provide for solving problems and creating knowledge?
  • 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 does abstraction make the development of computer programs possible?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: required

TEACHERS need to have the class and user accounts set up in Runestone to track student progress.

For the Students:

Note: If computer is not being used, students will need their own copies of the articles

Lesson Plan

Getting Started (5 min)

[use the Presentation on Programming Python in Runestone]

Journal Entry: What are some ways that writing programs is a creative endeavor? [ slide 2]

Share answers with your elbow partner. Then share answers with class

Note to the teacher: This lesson comes immediately after the practice Explore performance task. To provide more time for sharing and discussion, you may want to assign the reading and questions from Activity 1 as homework in addition or instead of the optional homework.

Guided Activities (40 min)

Activity 1: Computing for Good [15 min]

Open Discussion: What are some ways you know that computing has been used for “good?” [ slide 3 ]

Go to Programming for Good: The Story of Code for India

http://www.attendly.com/programming-for-good-the-story-of-code-for-india/

Read articles or selected text in pairs, with alternating pairs each reading one article. Pairs of pairs get together to share what they read and what they got out of the article.

In pairs, answer the following questions:

  1. How did the impact of Hurricane Sandy in 2012 begin the concept of Code for India?
  2. What is the reason for the Adopt-a-School app, and what is the result of its use?
  3. What is the reason for the Spotter app?
  4. What is the reason for the Bravehearts app, and what is its significance for public safety? Where else would this app be useful?
  5. If you were able to design an app “for good,” what problem would you try to solve?

Check for Understanding: Teams should share their answers to their instructor.

Activity 2: Coding with Python in Runestone [25 min]

Have students schetch the computer hardware architecture diagram in Python for Everybody Chapter See https://books.trinket.io/pfe/01-intro.html#computer-hardware-architecture.

Explain that computer processes guide the flow of information that is input, processed, stored or output. The processor (CPU) uses short term memory for doing calculations and temporary storage and long term memory if needed. Have students sketch the computer components diagram above.  Explain to students that they will learn to program to develop software using each of these components.

This could be review from a previous computer class.  If it is new to students assign one or both of the following.

Watch the video on how programs use input, processing, memory and output to run programs. https://www.youtube.com/watch?v=BSTrWhAGta8

Read Computer Hardware architecture by Dr. Severance.

https://books.trinket.io/pfe/01-intro.html#computer-hardware-architecture

 .

BE SURE YOU HAVE SET UP STUDENT ACCOUNTS

  1. [Use the Presentation on Programming Python in Runestone slides 4].  Open Runestone as was done in Unit 1 Lesson 6. Students use their accounts to access the eTextbook
  2. Read The Way of the Program and answer questions on the student handout.
  3. Go to the next section: Algorithms and check to see that all student answers are being correctly recorded in Runestone. Display answer results on the teacher screen. Have students continue to fill in answers on student handout. [ slide 5]
  4. Have students independently complete the next 3 sections (or finish them for homework) and fill in the student handout.
  5. Skip ahead to A Typical First program [ slides 7-13]
    1. Demonstrate how to run the program, change the code, add an input line, and display the value input in the print statement.
    2. Explain the idea of syntax, and the result of various mistakes.
  6. Discuss abstracting in coding. [ slide 14 ]

Homework: Seven things you should know if you’re starting out programming

Have students go to the article Seven things you should know if you’re starting out programming at

http://www.theguardian.com/info/developer-blog/2011/oct/07/programming-developer-journalist

Before dividing the students into groups for the next activity, it is important to address the paragraph at the beginning of the reading, which mentions the "coder stereotype" and includes a parenthetical note that the author believes this stereotype to be (largely) accurate.  Explain that because of the breadth of application areas of computing in today’s world, this stereotype is not an accurate view of the diverse field of computing – there are a wide variety of people in computing and a wide variety of applications of computing education. See videos at http://mcwic.github.io/htmlblocks/computerscientistlibrary.html#top

In pairs or groups of three, assign each group to read and summarize one of the seven programming principles in the article.

  1. Logic (not "math")
  2. Catch a shooting star (variables)
  3. Dictionary (data types)
  4. Russian Dolls (things within things, instances)
  5. Sausage (processes)
  6. The dog, the cat, and the fish (causation, event change)
  7. Pizza (abstraction) include why abstraction is "like making pizza," and what other kinds of activities might fall into that category.

Check for Understanding: Each person should write a 140 character tweet on their topic, next class the group should share their findings with the class.





Options for Differentiated Instruction

Oral reading strategies such as "popcorn reading" where students take turns reading a paragraph and then pass the reading off to another student in the class, or other reading strategies such as students reading together quietly in pairs, can be used for longer texts. 

Longer readings can be broken up by sections or paragraphs to speed the lesson up or keep students engaged.

Activity 1 could be assigned as homework from the day before as a step into this lesson to allow more time in class for the other readings:

Additional activity: Ask students to read the Preface (pages iii-iv) and Chapter 1 introduction and section 1.1 (pages 1-2) of Python for Everybody  and answer these questions:

  1. Why does the author think that Python is a better teaching language for beginning programmers than Java?
  2. Why does the author consider programming to be a creative activity?  
  3. What things are computers better at doing than people?
  4. What things are people better at doing than computers?
  5. What are some motivations for writing computer programs? List some responses not included in the selected reading.
  6. What do you think of the author's writing style?  Name some positive and negative aspects of the presentation in the text.

Evidence of Learning

Formative Assessment

Students will use several different strategies for reading and writing responses based on their readings.

Classroom discussions and student responses (written and oral) will allow instructors to check for understanding.

 


Summative Assessment

Summative assessment will be included in Part 2 on the use of the PyCharm IDE.

Student handout filled in

Tweet from optional homework assignment

Progress recorded in Runestone for the General Introduction 

Lesson Summary

Summary

PyCharm, an IDE for Python, will be introduced. Keywords, file, and variable naming conventions will be addressed.

Outcomes

  • Students will find and launch PyCharm.
  • Students will configure PyCharm's appearance.
  • Students will create a Python project in PyCharm.
  • Students will name and save projects according to the requirements of their instructor.
  • Students will create a Python file (.py file).
  • Students will add line numbers to the file.
  • Students will add comments to the file.
  • Students will write, debug, and run a simple Python program.

Overview

  1. Getting Started (10 min)
  2. Guided Activity (20 min)
    1. Introduction to PyCharm
  3. Summative Assessment (20 min)
    1. Programming Exercise
  4. Homework Assignment

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

Key Concepts

Students will learn what an IDE (Integrated Development Environment) is and why it is good to use one when programming. 

Students will be able to find, configure and use the PyCharm IDE to write, save, run, debug and retrieve their Python modules according to the requirements of their instructor. 

 


Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How do computer programs implement algorithms?
  • How do people develop and test computer programs?

Teacher Resources

Student computer usage for this lesson is: required

For the Students

Lesson Plan

Getting Started (10 min)

  • Journal: What environments have you already used to write Python programs?
  • Share answers in class.
  • After students have shared their answers, introduce the topic of Integrated Development Environments (IDEs). Explain that an IDE provides a way to manage files, write code, get help with code syntax and usage, and the ability to test, run, and debug programs in an environment they are able to configure to their own liking.
  • As defined by Wikipedia:  “An integrated development environment (IDE) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, automation tools, and a debugger. Most modern IDEs offer intelligent code completion features.” (From: http://en.wikipedia.org/wiki/Integrated_development_environment)
  • Have students go to Python Central at http://www.pythoncentral.io/the-best-python-ides-you-can-use-for-development/ for a list of the top IDEs for Python. PyCharm is listed as one of the best. Explain to students that they will be learning to use the PyCharm IDE.
  • Share tweets from the homework about the 7 aspects of programming quickly standing up in place and sharing.
      1. Catch a shooting star (variables)
      2. Dictionary (data types)
      3. Russian Dolls (things within things, instances)
      4. Sausage (processes)
      5. The dog, the cat, and the fish (causation, event change)
      6. Pizza (abstraction) include why abstraction is "like making pizza," and what other kinds of activities might fall into that category.

        If they did not assign the homework, review Seven things you should know if you’re starting out programming 

         Have students go to the article Seven things you should know if you’re starting out programming at 

        http://www.theguardian.com/info/developer-blog/2011/oct/07/programming-developer-journalist

Activity (20 min)

Introduction to PyCharm

  • Find and launch PyCharm. If there is not a shortcut on your desktop, go to Programs >> JetBrains >> JetBrains PyCharm Community Edition 3.4.1.
  • The first screen will provide options for Create New Project, Open Directory, Check out from Version Control, Configure, and Docs and How-Tos.
  • Select Configure >> Settings >> Appearance. Explore Screens under UI Options. IntelliJ is the default appearance
    • Darcula and Windows are some other options.
    • Students should explore other options available.
    • Students should play with the appearance and select a new one (with your approval) if they have a preference.
  • Click the arrow to go back to the Quick Start menu.
  • Click Create New Project.
  • Give the project a name.
    • Click the ellipses (the … at the end of the location field) to navigate to the location you need to save your work.

Teacher note: This may be a good time to have students configure the default Working Directory as shown in the Python and PyCharm Installation and Configuration Guide file in the lesson resources folder.

  • When you click “OK,” your project will be created.
  • Click File >> New >> Python File to create your .py file. Name your first .py file rate_time.
    • The code for this module will be copied from the ‘Non-Programmer's Tutorial for Python 3/Who Goes There?’ tutorial shortly.
  • Click OK to create the file.
    • The user name of the author of the file will appear at the top of the code window with the default comment method.
  • Take students through some configuration modifications, such as adding line numbers, showing the console, and changing the default for comment style, all covered in the Installation and Configuration Guide.
    • If you are projecting your screen, you can use Presentation Mode to make viewing easier for students.
  • Allow students some time to explore the environment.
  • Visit Non-Programmer's Tutorial for Python 3/Who Goes There?
  • Prior to copying the code for rate_time.py and area.py, take students through the sections in the Non-Programmer's Tutorial for Python 3/Who Goes There? on Input and Variables.
  • Explain and model variable types and their behaviors, and concatenation.
    • For ease of use, consider using the comma at this time to avoid confusion about concatenation.
  • Create, save, run and debug programs rate_time.py and area.py.
  • To run a program for the first time, go to Run and select the file you want to run.
    • After that, the Run command will appear in the upper right corner of the PyCharm IDE.
  • As you add new modules to the project you will need to go to Run and select the new file.
    • After that, the file names will appear in a drop-down menu next to the green Run arrow.
  • If it has not already been configured, go to Tools >> Run Python Console to show the console at the bottom of the PyCharm environment. Students can use this to test their code as they have in other environments.
  • In the PyCharm console, test code from An Informal Introduction to Python 3.1 Using Python as a Calculator. (https://docs.python.org/3.4/tutorial/introduction.html#using-python-as-a-calculator).

Summative Assessment (20 min)

Students are to:

  • Create a new Python module (.py) called name.py.
  • Comment in their name, date, and name of project as directed by their instructor at the top of their code window.
  • Assign their full name to an appropriately named variable.
  • Assign their age to an appropriately named variable.
  • Output their name and age as a sentence, with variables and literal values concatenated correctly.
  • Debug any errors and run their program with the correct output and without error.

Sample code (will throw an error) 

# author = 'iam tester'
# date July 4, 2024
# name.py
name = 'Ima Tester'
age = 15
print (name + " is " + age + " years old.")

The above code will throw an error, because age is an integer and needs to be expressed as a string OR concatenated using a comma (,).

 name = 'Ima Tester'
age = 15
print (name,"is",age,"years old.")

Important notes about naming your files and variables:

  • Our Python coding examples will follow the PEP 8 Style Guide. (http://legacy.python.org/dev/peps/pep-0008/)
    • Teachers are not required to use this standard but should establish their classroom conventions for students to follow.
  • Modules written in Python, .py file names, should be in all lower case as is done with the sample files in the Python for Everybody textbook. (https://www.py4e.com/code3/)
  • Variable names should begin with a lowercase letter with multiple words separated by an underscore.
    • Teachers may choose to use camelCase or another naming system and should be specific and consistent with students regarding these requirements.
  • Python file names and variable names must not begin with a number, and cannot be the same as Python keywords: 
 and       del       from      not       while
as        elif      global    or        with
assert    else      if        pass      yield
break     except    import    print
class     exec      in        raise
continue  finally   is        return 
def       for       lambda    try

(from http://www.pythonforbeginners.com/basics/keywords-in-python)

  • For more information concerning variable names and keywords to Python, go to

Homework Assignment

  1. Use two sources to find definitions of "algorithm", cite the sources
  2. Write down the steps involved in a daily task – creating a peanut butter and jelly sandwich; getting to school; brushing teeth; completing homework; etc…) 

Options for Differentiated Instruction

 Students can work in pairs, side by side, to help each other through each step of the process.

 


Evidence of Learning

Formative Assessment

Checks for understanding throughout the entire process of learning to use the PyCharm IDE by using active participation in trying each step of the process and having students help their elbow partner when difficulties arise.


Summative Assessment

Assessment tasks:

  • Create a new Python program file.
  • Add a comment containing their name, date, and name of project as directed by their instructor at the top of their code window.
  • Assign their name to an appropriately named variable.
  • Assign their age to an appropriately named variable.
  • Output their name and age as a sentence with variables and literal values concatenated correctly.
  • Debug any errors and run their program with the correct output and without error.

Lesson Summary

Summary

This is the first day of a two-session lesson sequence with topics covered by mini-lectures, explorations, and practice exercises.

Outcomes

  • Students will be able to answer the question, "What is an algorithm?"
  • Students will explore algorithms described in English
  • Students will understand Magic Square construction and parallel algorithms

Overview

  1. Getting Started (5 min)
  2. Activities (40 min)
  3. Wrap-Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP7: Look for and make use of structure.

Common Core Math:

  • A-SSE.1-2: Interpret the structure of expressions
  • A-SSE.3-4: Write expressions in equivalent forms to solve problems

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 2. Developing and using models
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)

Key Concepts

Students will provide a definition of "algorithm".

Students will identify the characteristics of describing algorithms in English, pseudocode, or a programming language.

Students will demonstrate an understanding that there are different algorithms for different situations, such as parallel processing for multiple CPUs.


Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How are algorithms implemented and executed on computers and computational devices?

 

 

Teacher Resources

Student computer usage for this lesson is: none

PowerPoint Slides for mini-lectures (AlgorithmsPseudocode1.pptx in the Lesson Resources folder)

Excel sheet summary for creating a 4-by-4 Magic Square (MagicSquare4by4.xls in the Lesson Resources folder)

(optional) 16 papers, each with a number from 1-16 on it for students to use when acting out the magic square. 

Lesson Plan

Getting Started (5 min)

  • Journal Entry Review

–Small group, then large group, review of two previous homework assignments (students were assigned to use two sources to find definitions of "algorithm" and were assigned to write down the steps involved in a daily task – creating a peanut butter and jelly sandwich; getting to school; brushing teeth; completing homework; etc…) The definitions, sources, and algorithm steps were to have been entered into their journal. 

- Have students consider solving problems alone or with others. Point out that some computers have more than one processor and an algorithm can be written to do 2 or more processes in parallel. Consider some complications that might arise in the simple algorithms that have been developed by students if there were multiple CPUs.

Activities (40 min)

  • Guided Activity 1

– Act out selected homework “steps of a daily task” to highlight the potential ambiguity of English instructions.

  • Mini-lecture 1

– Review Understanding by Design (UBD)-style slide for “Algorithms and Pseudocode: Need to Understand / Important to Know or Do / Worth Being Familiar With” (slide 2 of AlgorithmsPseudocode1.pptx presentation in Lesson Resources folder).

  • Guided Activity 2

– Class creates a 4-by-4 Magic Square, as described in MagicSquare4by4.xls in Lesson Resources folder. Sixteen students should be chosen to represent the sixteen numbers, and physically move into the 16 spaces following the algorithm in this document.  (This provides an example of a “simple” algorithm that solves a more complex problem; it also gets the students out of their seats and moving around).

Reflect: Would it be easier or harder for 2 people to work on this together? (multiple CPUs or parallel processing)

  • Mini-lecture 2

–In AlgorithmsPseudocode1.pptx (presentation in Lesson Resources folder), walk through “Main Ideas”; “Representing Algorithms”; and “Sequential Algorithms” slides, including pseudocode circle example.

Wrap Up (5 min)

  • Review concept of "algorithm"
  • Review concept of multiprocessor algorithms that use parallel processing.
  • Homework: Assign students to write pseudocode for selected algebraic computations.

Options for Differentiated Instruction

"In your words" pair/share as the concept of what an algorithm is (and what is not an algorithm -- e.g. "sort the numbers") is developed.

Class-wide development of the graphical organizer should be facilitated with scaffolding to support students who are having difficulty with the concept.


Evidence of Learning

Formative Assessment

The following "Checks for Understanding" could be used to guide the students towards the two learning objectives.

Objective: Students will be expected to learn to provide a definition of "algorithm".

  1. Example/Non-Example:  As the class develops a consensus definition of "algorithm," a list of daily living tasks and technical tasks will be discussed to see if their description can match the definition.
  2. Exit Ticket:  As students leave the room they will hand the teacher a definition of "algorithm", in their own words, plus an example.  The teacher will use these to guide the next day's instruction.

Objective:  Students will learn to identify the characteristics of describing algorithms in English, pseudocode, or in a programming language.

  1. Graphic Organizer:  As the characteristics of English, pseudocode, and a programming language are compared and contrasted, a table will be created on the board that captures the dimensions of what the students discuss.  The students will score the result as to how well it helps their understanding of the concept.  When it is "very good," we will capture it for their use.

Summative Assessment

Students will research formal definitions of algorithms.  These will be entered into their journals and pair-shared with a peer.

Students will write out the sequence of steps in one or more daily living tasks, such as "brushing their teeth" or "building a peanut butter and jelly sandwich."  These will be entered into their jourmals and pair-shared with a peer.  Selected solutions will be "acted out" in the classroom.

 

Lesson Summary

Pre-lesson Preparation

This is the second session on algorithms

Summary

During the second session, the students will use pseudocode to describe an algorithm.

Outcome

  • Students will write pseudocode using sequencing, selection, and iteration constructs.
  • Students will write pseudocode for algebra / geometry formulas.
  • Students will write pseudocode for determining if a year is a leap year.

Overview

  1. Getting Started (5 min)
  2. Guided Activities (40 min)
    1. PowerPoint
    2. Think-Pair-Share
    3. Solutions check
  3. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP7: Look for and make use of structure.

Common Core Math:

  • A-SSE.1-2: Interpret the structure of expressions
  • A-SSE.3-4: Write expressions in equivalent forms to solve problems
  • F-IF.1-3: Understand the concept of a function and use function notation
  • F-IF.4-6: Interpret functions that arise in applications in terms of the context

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 2. Developing and using models
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)

Key Concepts

Students will write pseudocode using sequencing, selection, and iteration constructs.


Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How are algorithms implemented and executed on computers and computational devices?
  • How do computer programs implement algorithms?

 

Teacher Resources

Student computer usage for this lesson is: optional

Files in the Lesson Resources folder:

AlgorithmsPseudocode2.pptx : PowerPoint Slides for mini-lectures

Student Handout and Key for Matching Pennies Game

Student Handout for Rock Paper Scissors

Psuedocode Summary and Examples of common Algorithms.docx

Lesson Plan

Getting Started (5 min)

  • Homework Review from Session 1 (students were assigned to write pseudocode for selected Algebra/Geometry calculations)
  • Journal: Describe the algorithm of another student. Is there enough detail to allow somebody to follow the steps?

Guided Activities (40 min)

PowerPoint

Walk through “Selection Statements”; “Iteration / Repetition” slides from the AlgorithmsPseudocode2 file in the Lesson Resources folder.

Things to stress with your students:

1.  Whenever you need to store information, it must go into a variable.  So think about what variables might be needed when you are creating your algorithm

2.  Selection and Iteration statements require conditionals.  Identify a conditional as something that returns a True or False answer.  If selects the next statement to occur by answering the conditional question as being true or false.  I have in the past pointed out the True and Then both start with T so TRUE always does the THEN, wherease Else and False both end with LSE, so when the answer if FALSE, you do the ELSE.

While continues to loop as long as the conditional answer is TRUE.  When the conditional answer is false, the  algorithm jumps to the statement after the End While.

3. Nearly all programming languages are equivalent in terms of being able to express any algorithm. Each has its own way to use variables, conditions and repetition which are needed for a solution to almost all algorithms.

Guided Activity

During powerpoint, guide students through the Game of Matching Pennies (a student working copy and a solution key is in the Master Teacher Resource folder for this lesson).  

Think-Pair-Share

Students work in pairs to create and share their pseudocode.  Use the Rock Paper Scissors hand out to have student pairs psuedocode Rock Paper Scissors.  If there is time, have groups switch algorithms and critique the algorithm of the other group.

Walk through pseudocode syntax summary handout called Pseudocode Summary and Examples of common Algorithms.docx in Lesson Resources folder.

Students work through challenges and check their results against sample solutions. 

Wrap Up (5 min)

Review slide: "Why we have leap years." 

Homework:

Assign students to create pseudocode for leap years.


Options for Differentiated Instruction

Pairing of students and crossing pairs to form groups of four should be used for the set of exercises that are part of this lesson.


Evidence of Learning

Formative Assessment

Think-Pair-Share


Summative Assessment

Students will write pseudocode for algebra / geometry formulas.  These will be entered into their class notes.

Students will write pseudocode for determining if a year is a leap year.  This will be entered into their journals.

Lesson Summary

Summary

Students learn simple Python programs and their structure, as well as the basics of debugging.

Outcomes

  • Students will identify the parts of a Python program
  • Students will describe the history of the computer bug.
  • Students will look at debugging techniques and classifying errors.
  • Students will compare different kinds of errors

Overview

Session 1:

  1. Getting Started (5 min) Discussion: What is a program?
  2. Guided Activity (40 min) Exploration
  3. Wrap Up (5 min)
  4. Homework

Session 2:

  1. Getting Started (20 min)
    1. Homework Review [5 min]
    2. Runestone Tutorial [15 min]
  2. Activity (20 min)
  3. Wrap Up (10 min) Journal
  4. Homework

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

Programs can be developed to solve problems (to help people, organizations or society), for creative expression, to satisfy personal curiosity or to create new knowledge.

Additional outcomes beyond the original purpose of a program are possible.


Essential Questions

  • 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?

Teacher Resources

Student computer usage for this lesson is: required

For the Students:

    • "Is Eliza Human?"
    • CodingBat practice
        Useful once functions have been taught

http://codingbat.com/python

      Development environments for python
        Spyder Python Development Environment:

https://github.com/spyder-ide/spyder

        Python IdlePycharm Python Development Environment using Python 3.4.1
        Runestone: Interactive Python:

http://interactivepython.org/runestone/static/thinkcspy/index.html

Lesson Plan

Session 1

Getting Started (5 min)

Journal Prompt: What is a bug in a computer program?

  • See if anybody knows the history, this will be covered in Runestone General Introduction What is Debugging? lesson that follows.

Guided Activity (40 min)

  • Runestone Tutorial [30 min]

  • Jigsaw: Divide students up into 5 groups. Have each group prepare a creative presentation on one of the topics below with visuals or an active component (rap, song, dramatic reading, etc.) to convey the message of that section. Groups have 15 minutes to prepare a 2 minute presentation.
  • What is Debugging?
  • Syntax errors
  • Runtime Errors
  • Semantic Errors
  • Experimental Debugging

  • After the presentations all students should 
    1. make a tree diagram, name the three types of errors, and give examples of each. Which type of error do you think is the hardest to detect and why?
  • Explore a simple Python program together. [ 10 minutes]

    • Teacher demonstrates the results of running eliza.py using Pycharm or Idle 
    • Hand out the code for eliza.py on paper to students, demonstrate on the front screen have them mark up the code as indicated on the student handout together as a class discussing the vocabulary below (all of these concepts will be taught in Unit 2, this is just a preview).
      (See the teacher guide for answer key.)
    • Vocabulary: (use the Runestone Glossaries if needed)
      • comment
      • function: 
      • parameter
      • input
      • output
      • loop
      • condition
      • variable
    • Have students mark up the code at the bottom of the page using the same key on the student handout

Wrap Up (5 min)

Journal: Use formative assessment Questions 1 - 3:

  1. How do you make an output statement in Python?
  2. How do you make an input statement?
  3. What is a user prompt and what is its purpose?

Homework

Set up your IDE and Python at home (if you can) or use an online Python IDE such as https://repl.it/languages/Python3 or ideone.com . Type up a simple "Hello World" program and get it to run. Bring in evidence that it works or write a few sentences about the issues you are having in trying to install it or write about your experience using an online IDE, or write out the code for Hello World without looking at any notes and report on how easy or hard it was to remember the details. (Be careful not to make any student feel awkward for lack of a home computer they are allowed to install softare on)

Session 2

Getting Started (20 min)

Homework Review [5 min]

Collect handwritten notes or evidence that Python 3 is set up at home or the student is able to use https://repl.it/languages/Python3 or ideone.com. As students work on tutorial, address specific issues with students who had trouble with install.

Runestone Tutorial [15 min]

Complete an introductory tutorial:

Runestone Ch. 1 http://interactivepython.org/runestone/static/thinkcspy/GeneralIntro/toctree.html 

Activity (20 min)

Develop the beginnings of a chat bot where the computer and user introduce themselves to each other.  The computer asks a question, the user provides a response and the computer responds back again, including the user input within the response (see https://groklearning.com/csedweek/ for ideas). Extend: Give your chatbot a personality like a friend, grandfather, therapist, or child. 

Wrap Up (10 min)

Journal [10 min]

First discuss: How can additional desired outcomes happen independently of the original purpose of a program? (examples: a program like chatbot could help someone learn a new language, provide entertainment for a shut-in. Computer games can increase reflexes, logic skills, provide motivation for someone in physical therapy) 

Answer Formative assessment Questions # 4 - 6:

4) Name several different input devices.

5) How do we comment a Python program? Why do we use comments?

6) In your journal, make a tree diagram, name the three types of errors, and give examples of each. Which type of error do you think is the hardest to detect and why?

Homework

Write code to introduce yourself. Display your name. Greet and ask for three interests. Display the three interests and give a reply like "That's interesting!" Print your code. Next day: Have students introduce one another by “running the code" of a classmate. If you cannot get PyCharm to install, use http://ideone.com/ or repl.it or create this program by hand on paper.


Options for Differentiated Instruction

Suggested strategies:

  • Use red, yellow, green sticky notes at computer for a quick check of understanding.
  • Provide guide questions for reading during Runestone interactive tutorial.
  • Provide teacher-annotated text excerpts or have students annotate their own excerpts that follow the Runestone interactive.

Evidence of Learning

Formative Assessment

In your journal, make a tree diagram, name the three types of errors, and give examples of each. Which type of error do you think is the hardest to detect and why?


Summative Assessment

Find the errors in an algorithm or in Python statements covered to date

Define what debugging is and give examples of the 3 categories of bugs (syntax, logic(semantic) and runtime)

Describe the differences between programming and debugging.

Lesson Summary

Pre-lesson Preparation

Create a table of values of all types and print a copy of them on the cardstock for each group. Cut the papers up into individual cards, so each value is on its own card. Place each group's cards in a plastic bag.

Summary

Students are introduced to basic programming vocabulary, including integers, floats, strings, values, and expressions.  They will work through a set of guided notes and slides, and, then, be released to explore Python through an independent (or paired) exercise. 

Outcomes

  • Students will learn that values are fundamental things that the program manipulates.
  • Students will program four different types of values: floats, ints, strings, and booleans (briefly).
  • Students will understand that expressions are evaluated by Python and result in a value.
  • Students will understand that statements are executed by Python and may not result in a value.

Overview

  1. Getting Started (5 min)
  2. Introduction of Content (10 min)
  3. Guided Activity: Type Sort (15 min)
  4. Independent Activity (15 min)
  5. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

NGSS Practices:

  • 2. Developing and using models
  • 5. Using mathematics and computational thinking

Key Concepts

  • Values are fundamental things that the program manipulates.
  • So far, we have seen four different types of values: floats, ints, strings, and booleans (briefly).
  • Expressions are evaluated by Python and result in a value.
  • Statements are executed by Python and may not result in a value.
  • Python is a high level language that provides abstractions that make it easy to create powerful programs.
  • High level languages are translated by the computer into a lower level language that the computer can process.

Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?
  • What is the difference between an expression and a statement?
  • What are the different data types?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • "Values and Types" slides
  • "Exploration Question" document

Team Shake App 

Runestone: Values and Expressions

Lesson Plan

Getting Started (5 min)

  • Write a reflection on the homework from last class to write code to introduce yourself. The program should:

    1. Display your name.
    2. Greet and ask for three interests.
    3. Display the three interests
    4. Give a reply like "That's interesting!"

    Did you run into any errors?

    Do you feel that you can easily write this kind of code?

    Share results with an elbow partner.

Teacher NoteIdeally, students are paired with people they don't work with as frequently, in order to promote classroom culture.

Introduction of Content (10 min)

Point out that Python is a high level programming language. It provides many tools that make it easy to build complex programs with little effort. In order for the computer to process the code, it must translate(compile) the Python statements into a lower level language that the particular computer can understand and process. A variety of different variable types is one of the abtractions that are available in a high level programming language, and the language must define how the data is both stored and manipulated for each kind of data. You do not need to understand HOW the implementation works in order to use variables in your program.

Refer to the PowerPoint called Values and Types in the Lesson Resources folder. 

  • Value:
    • Everything on a computer reduces to numbers
      • Letters are represented by numbers (ASCII codes)
      • Pixel colors are represented using three numbers (red, green, blue)
    • Python tells these numbers apart by the use of types
  • Type:
    • A set of values and the operations performed on them
      • Examples of operations: +, -, /, *
      • The meaning of these depends on the type!
  • Integers (ints):
    • Values: ... -3, -2, -1,0,1,2,3,4
      • Integer literals have no commas (1, 2, 10, 1034453)
    • Operations: +, -, * (multiply), /, ** (to the power of)
  • Floating point (float):
    • Values: (approximations of) real numbers
      • In Python, a number with a '.' is a float (ie. 2.0)
      • Without a decimal, a number is an int (ie. 2)
    • Operations: +, -, * (multiply), /, ** (to the power of)
    • Exponential notation is useful!

Check for Understanding: Have students write an integer on their paper (check with their elbow partner that it is a number). Ask students to turn that integer into a float with the same numerical value.  Talk about going the opposite direction (float to int).

(Example answers:  int: 3   float: 3.0 or 3.00 or ...)

  • String (str):
    • Values: Any sequence of characters within double or single quotes
    • Operations: + (referred to as catenation or concatenation)
    • Concatenation can only apply to strings
      • "hello" + "world" = "helloworld" 
      • "hello" + " world" = "hello world"
      • "hello" + 2 produces an error
  • Boolean (bool) :
    • Values: True, False
      • Boolean literals are just True and False (they must be capitalized!)
    • Operations: not, and, or
      • not b: True if b is False and False if b is True
      • b and c: True if both b and c are True; False otherwise
      • b or c: True if b is True or c is True; False otherwise
    • Check for Understanding: Hold up two objects for the students to see, then ask the following questions:
      • I am holding object A and object B. True or False?
      • Drop one of the objects. I am holding object A and object B. True or False?
      • I am holding object A or object B. True or False?
    • Often comes from comparing int or float values
      • Order comparison: i< j     i<=j    i>=j    i>j
      • Equality, inequality: i == j     i!= j   ('=' means something else!)

Guided Activity: Type Sort (15 min)

  1. Group students (see differentiation for grouping options).
  2. Ask teams of students to group the values by types.

Teacher Note: See Differentiation for two variations of this activity.

Individual Activity (15 min)

Students will complete the Exploration Questions worksheet which is found in the Lesson Resources folder. 

  • Version 1:
    • Hand out exploration worksheet and allow students to work individually on their computer in PyCharm IDE or terminal/command. 
    • Make sure students are filling in their expected value before determining the calculated value.  They need only fill in the "reason for calculated value" if their two values do not match originally.
  • Version 2:

Wrap Up (5 min)

  • Exit ticket: Give the value of the Python expression. Also give the name of the operator used.
2 + 5
5 * 2
5 ** 2
5 / 2
5 % 2
5 + 2 * 4
5 * 2 - 3
  • Which of the following Python expressions give an error in Python?
"pay attention to details'
' " what's for lunch?", my partner asked'
"What's for lunch?", my partner asked"

Options for Differentiated Instruction

Ideas for grouping students:

  • Team Shake App A simple app that allows you to put in your students, decide the number of "teams", and randomly groups students. It will allow you to balance teams based on skill or gender, and will allow you to share teams via facebook or email.
  • Require students to go find other people in the room and give them a high-five. They may not high-five the person next to them. 
  • Group by birthday month (make adjustments to the groups as needed)
  • Number off
  • Ask students to count up the letters in their first name and determine if they have an odd number of letters or an even number of letters.  Find three or four others who also have an even or odd number of letters in their name and form a group. 
    • Variation if you have talked about other number systems:  Find the number of letters mod the number of groups you need.

Group Activity Variations:

  1. Give the students a large piece of colored paper and a glue stick, and allow them to glue the types together for later use in the classroom.
  2. Create small, individual sets of cards, and have them glue the cards in to their journals by type.
  3. Create multiple sets of values. Hand all groups the first set of values and allow them to organize the values by type.  For the remaining sets, have groups compete against one another to see who can sort the values the fastest.
  4. Print out Bingo cards of values ahead of time and call for: an integer less than 10 and greater than 5, a String with 3 letters, etc. http://www.teach-nology.com/web_tools/materials/bingo/5/ 

Evidence of Learning

Formative Assessment

Checks for understanding are incorporated throughout the lesson.


Summative Assessment

Exit ticket questions are incorporated into lesson.

 

Lesson Summary

Summary

Students will learn to manipulate variables and value assignments through an activity in which they must become the variable.  By the end of the lesson, they will have identified variables as memory locations. They will also assign, copy, and destroy values in order to perform a swap algorithm and visualize Python's manipulation of variables and values in memory.

Outcomes

  • Students will learn about variable manipulation and assignment.
  • Students will understand variables representing memory locations.
  • Students will be able to use variables in Python.

Overview

  1. Getting Started (5 min) - Journal
  2. Introduction of Content (25 min) - Visualizing Variables
  3. Independent Activity (15 min) - "Swap to the Top"
  4. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 5. Using mathematics and computational thinking

Key Concepts

  • Variables are memory locations that we have named, so we can put things in those locations.
  • Variables contain values, and can only contain one value at a time.
  • When assigning one variable from another, a copy is made rather than a transfer.
  • If a variable is being assigned after having been initialized to a previous value, that previous value is lost and no longer accessible unless that value has been copied to another variable space.
  • Programs implement algorithms. In order to accomplish a task: create a plan (algorithm), translate it into code and identify what kinds of information will be stored and maniuplated (variables)

Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How are programs developed to help people, organizations or society solve problems?
  • How do computer programs implement algorithms?

Teacher Resources

Student computer usage for this lesson is: none

For the Students:

  • Cups
  • Notecards
  • String and paper to create large name labels (could also use nametags)
  • Worksheet: "Swap to the Top.docx" (in the Lesson Resources folder)
  • Homework 

Optional:

  • Differentiated one-pager (see "Options for Differentiated Instruction" in lesson).

For the Teacher:

  • Write the following code on the board (after students have a chance to brainstorm their own solutions):
team1 = "Miami Heat"
team2 = "Washingon Wizards"
temp = team1
team1 = team2
team2 = temp

Lesson Plan

Getting Started (5 min)

Journal

What is a variable?  What are some things in your life that change often?

Introduction of Content (25 min)

Introduction of Variables [5 min]

See slides in Lesson Resources Folder for a guided introduction.

Guided Activity: Visualizing Variables [15 min]

Materials

Disposable cups, index cards, names for variables on strings (to hang around students' necks)

Setup

  1. We’re about to talk about sports teams and their ranking in terms of variables. When we place teams on a ranking board, Team 1 is always at the top, followed by Team 2, Team 3, etc.  Write a ranked set of 3 to 5 (real or invented) teams on the board. As they play one another, this ranking may change and someone new becomes Team 1.
  2. Ask for a student volunteer.  Give this volunteer a cup: they are now representing a new variable!  In order for a computer to know which variable is which, they need names . Variable names can be any sequence (beginning with a letter or underscore, and including no spaces), but usually we use words that describe what is inside the variable. (For example, if I have a variable for "student’s age," I’m not going to name it tree, because the word tree has no relevance to your age.)
  3. Label this variable team1 because we’re talking about sports teams. Put the name around the student’s neck to indicate they have become the variable team1. This student has now become team1, and should not respond to any other names! Note: A variable name will never have quotes around it - that would indicate that it is a string (i.e., a type of value rather than a variable's name).  Variables can be identified (loosely) by words or letters that are not in quotes and are not keywords (for, if, else, etc.).
  4. Next, we will assign a value to the variable.  This means we will store that value in the location team1.  Because we have never used this variable before, we are initializing it - putting something in this box (memory location) for the first time.  On the board, write team1 = "Miami Heat"
  5. CFU:  What is the type of "Miami Heat"?
    ("Miami Heat" is a string.  We know this because it has quotes around it.)
  6. The equals sign is what allows us to make this assignment.  We are not saying that team1 is the same as the Washington Wizards; it is only where were are currently keeping that team. Write “Miami Heat” on a notecard and put it into the cup.
  7. Next, we need to initialize  our second variable and assign a value to it. Follow the same process as team1 and "Miami Heat", this time using team2 and "Washington Wizards".
  8. CFU: What is the difference between a value and a variable?
    (Values can be stored in variables.  The content of a variable can change to different values, but its name will always be the same because the name is just an identifier of a location in memory.)
  9. We’ve now initialized our two variables, but as it turns out… last night the two teams played, and the order was upset, putting the Wizards ahead!  We have to model a swap in our code to reflect this change and fix our scoreboard.
  10. Think-Pair-Share: A value is only safe (and not lost to the world of cyberspace) if it is in a variable.  A variable can only hold one value at a time.  How can we swap values between team1 and team2?
    (Allow students 3 minutes to brainstorm.)
  11. Call on students and have them direct team1 and team2 to swap their values. Key point: when we access a variable and put its value in the place of another variable, that value is being copied.  By doing so, however, any previous value in the variable is lost.
  12. Ideally, a student will realize they must create another variable and do so, walking each other through the completion of the swap.  If not, you should guide them towards this discovery.
  13. CFU (if necessary): Cold call a student to create a third variable, temp.
    (Make sure to call up a third member of the class to become the variable temp.)
  14. If students have not at this point finished the swap, continue to walk them through the swap of a value to the temp variable, so the variables do not overwrite one another.
  15. Initialize a variable temp (named so because we will not be using it very long). Write temp = team1 on the board.  Notice that in this assignment, it looks like we are setting a variable equal to another variable.  Instead, we are setting the variable temp equal to the value inside the variable team1.  This means that the value is copied to a second location.
  16. Call a new volunteer to the floor.  Give them a cup and name them temp.
  17. Write a second notecard labeled "Miami Heat" and put it in the temp cup.
  18. Now that the "Miami Heat" value has been saved somewhere, we can swap "Washington Wizards" into team1. Write team1 = team2 on the board.
  19. Go to team2 and copy the text from the notecard onto a new one. Move to team1 and replace the previous notecard with this new one.
  20. A variable can only store one value at the time, which means that we’ve lost whatever was in team1. Rip up the notecard or throw it in the trash.
  21. Complete the final assignment of team2 = temp by following the same process.  

Synopsis

Look at the code written on the board and ask a student to walk us through each step.

CFU: Why did we create the variable temp?

(Because variables overwrite the values of one another, and if we were to just set team2 = team1 we would lose one of the values.)

Students should notice:

  • Variables are memory locations that we have named, so we can put things in those locations.
  • Variables contain values, and can only contain one value at a time.
  • When assigning one variable from another, a copy is made rather than a transfer.
  • If a variable is being assigned after having been initialized to a previous value, that previous value is lost and no longer accessible.

Discussion [5 min]

In reality, Python actually has a "shortcut syntax" that allows us to make this swap in one step. It looks like this:

a,b = b,a

If we wanted to swap the values in team1 with team2, we would simply have to write:

team1,team2  = team2, team1

Here, Python is doing exactly what we were doing.  It is internally creating a variable (which has no name but serves the same purpose as our temp variable), using it as a place holder, and then completing the swap.  

Think-Pair-Share

Why would the makers of Python build in this function?  What other uses does it have? 

Independent Activity (15 min)

A version of this worksheet can be found in the Lesson Resources folder, titled "Swap to the Top".

Give students a list of games that have been played by the teams on the board, and the resultant new ranking.  Have them create a piece of code that will reorganize the teams into the correct ranking.  (They can assume that the variables team1 ... team13 already exist and have been initialized to the Friday ranking.)  Give them the option of doing so through the use of manipulatives, or on their own paper.

Wrap Up (5 min)

Discuss: All computer programs can be broken down into smaller, simpler steps. By developing components, testing to be sure they are correct and combining them you can create complex, correct programs. Did students get a feeling for systematic development, and how to trace a program one step at a time to verify correctness? Distribute Exit Ticket in Lesson Resources Folder which asks students to figure out the values of variables hello and goodbye after the code in each exercises been executed.

Journal

What is the difference between a variable in a math class and in a computer science class?  What is the difference between a float and an integer? Why would you use one instead of the other?

Homework  

Continue working on "Swap to the Top" worksheet.


Options for Differentiated Instruction

Create a 3 column ‘one-pager’.  In the left column, create a copy of the code from the activity (a swap algorithm) including team1, team2, and temp that performs the complete swap.  In the middle column, write steps that occur in the code (Step 1: Initialize variable and assign the value).  In the third column, the students should draw a visual of what that looks like in terms of disposable cups and index cards. (They can just write the variable name on the cup, rather than drawing in a person as well.) 


Evidence of Learning

Formative Assessment

Checks for Understanding are embedded in the lesson.  They are also shared below.

What is the type of “Miami Heat”?

(“Miami Heat" is a string.  We know this because it has quotes around it .)

What is the difference between a value and a variable?

(Values can be stored in variables.  The content of a variable can change to different values, but its name will always be the same because the name is just an identifier of a location in memory.) 

Think-Pair-Share: A value is only safe (and not lost to the world of cyberspace) if it is in a variable.  A variable can only hold one value at a time.  How can we swap values between team1 and team2?

(various answers)

Why did we create the variable temp?

(Because variables overwrite the values of one another, and if we were to just set team2 = team1, we would lose one of the values.)


Summative Assessment

Task: Create a piece of code that will rearrange the ranking of the teams in order to reflect the outcome of previous games. (Independent Practice)

Lesson Summary

Summary 

Students will learn how programs can solve problems using the various types of conditional statements in Python programs.

Outcomes

  • Students will understand how conditional logic controls program flow.
  • Students will be able to solve problems that require conditional logic.
  • Students will be able to look for answers in documentation (API)

Overview

  1. Getting Started (5 min)
  2. Introduction of Content (30 min)
    1. Comparison operators [5 min]
    2. Logical operators [5 min]
    3. Conditional statements [20 min]
  3. Activity (10 min)
  4. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.9 - Synthesize information from a range of sources
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes

Key Concepts

Decisions in programs are made using conditional statements.


Essential Questions

  • How are programs developed to help people, organizations or society solve problems?
  • How do computer programs implement algorithms?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

How are comparison operators and Boolean expressions used with conditional statements?

Teacher Resources

Student computer usage for this lesson is: required

Lesson Plan

Getting Started (5 min)

Journal

Think of a decision you make in your daily life and how you make the decision.  In your journal, write about your decision and the process you use to decide.

Teaching note: take a few minutes to have students share responses (whole class, elbow partners, small groups).

Introduction of Content (30 min)

Brief discussion of comparison operators [5 min]

==, !=, <, >, >=, <=

Briefly discuss logical operators [5 min]

Includes AND, OR, and NOT

Example: Type various combinations of Boolean values (True / False) with Boolean operators (not, and, or) into the IDE (PyCharm)

Conditional Statements [20 min]

Show physical representation using real-life example

Suggested Activity: What’s in the box?

Materials: Two small opaque containers, one small item for each container, two post-it notes.

Set-Up Directions: Set up the activity before the class arrives, following the directions below:

  1. Place one item in each container.
  2. Using the post-it notes, label one box "green" and the other "black."
  3. On the board, write the two colors (green and black) on the board to record the student tally.
  4. On the board, write the following pseudocode:
    if numofGreen > numofBlack:
        open green box
    else:
        open black box

Activity Directions:

  1. Ask: “If you could choose one of these colors, which one would it be? Please only vote once.  Raise your hand if you would choose Green." Record the number of students who voted for Green on the board.
  2. Ask: “Raise your hand if you would choose Black.” Record those votes.
  3. Show the students the pseudocode on the board and work through the if/else statement using the data collected from the class.
  4. Open the box and display the item that the class voted for.

Discussion of Conditional Execution (if, if/else) 

Show the example from How to Think Like a Computer Scientist text (ActiveCode:6 (ch05_4)) or similar example.  Briefly demonstrate how to read flowcharts while showing the example from How to Think Like a Computer Scientist. Point out that the API (https://docs.python.org/3/library/) is always available as a language reference to help translate from algorithms/flowcharts into code. The API describes many tools to make it easier to create programs, and is an important tool for all programmers.

Check for understanding: Have students answer to the following questions:

1. What will be printed by the following code segment?

x=15
if x==25:
  print ('Pizza is yummy')
else:
   print ('My teacher is awesome')

2. What will be printed by the following code segment?

x=35
y=52
if x!=25 and y==52:
  print ('Pizza is yummy')
else:
('My teacher is awesome')

Use IDE (PyCharm) to show how to create an if/else statement

Suggested Coding Example:

n = input('Please enter your password: ')
if n=='P@s5w0d':
print ('Welcome, correct user!')
else:
print ('Incorrect, try again')

Activity (10 min)

Journal: Making Predictions [2 min]

Give the students the practice problem from Independent Activity 1 below.  Have the students answer the following questions:

  1. You are about to create a program using the given criteria. In your opinion, what is the purpose of this program?
  2. What do you think the output of  this program is when the food variable contains the following values?
    pizza
    popcorn 

Independent Activity 1 [8 minutes]

If/else practice problem: In the IDE, write a program that will prompt a user to enter a value for a food item. Evaluate the variable food. If the value of food is equal to “potato salad,” display “In Stock”.  If the value of food is not equal to “potato salad,” display “Not in Stock”.

Test your program with the following values for food:

pizza
popcorn
potato salad

Wrap Up (5 min)

Journal

Thinking about conditional execution, answer the following questions.

  1. What difficulties, if any, did you encounter during the development of your program?
  2. After running your independent program, were your predictions correct?
  3. What conditional execution concepts do you need clarified?
  4. How is it helpful to have a reference available for each programming language?

Options for Differentiated Instruction

Alternate Instructional Strategy for Guided Practice :

  • For guided practice, have a list of instructions for how to write the example presented.

Alternate Instructional Strategy for Journal: Interactive Journaling

  • Comment on the journal entry by asking check-for-understanding questions or clarifying any misconceptions students write about.

 


Evidence of Learning

Formative Assessment

  • A variety of checking for understanding techniques
    • Temperature checks
    • Teacher review student's code
    • Thumbs up/ thumbs down 
    • Questioning thoughout the lesson (whole group / small group / individual)
  • Quick quizzes
  • Interactive journaling

Summative Assessment

  • Students create a small program demonstrating conditional execution
  • Reflective journal entry

Lesson Summary

Pre-lesson preparation

Students must have an understanding of using conditional statements, and have completed all the assignments from Lesson 2-8.

Summary

Students will learn how programs can solve problems using nested and chained conditional statements in Python programs.

Outcomes

  • Students will understand how nested and chained conditional logic controls program flow.
  • Students will be able to solve problems that require nested and chained conditional logic.
  • Students will work collaboratively, resolve conflicts and facilitate group work to create a small program.
  • Students will use their journals to record answers and check for understanding and reflection.

Overview

  1. Getting Started (5 min)
  2. Introduction of Content (30 min)
    1. Conditional Statements [10 min]
    2. Nested Conditional Statements [15 min]
    3. Chained Conditional Statements [5 min]
  3. Activity (10 min)
  4. Wrap-up (5 min) 

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP5: Use appropriate tools strategically.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core ELA:

  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

Students must know that conditional statements can be used inside of other condtional statements using nested and chained conditional statements.

Vocabulary:

  • nested conditional statements
  • chained conditional statements

Essential Questions

  • How are programs developed to help people, organizations or society solve problems?
  • How do computer programs implement algorithms?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources Folder:

  • Nested If Statement Setup

Reference Text:

Project Ideas:

Lesson Plan

Getting Started (5 min)

In your journal, write what will be displayed by the following code segment.  How do you know your answer is correct?

x=2500
if x < 1000:
   print(“small number”)
else:
   print(“big number”)

 

Introduction of Content (30 min)

Brief introduction to conditional statements (10 min)

Suggested Activity: What’s in the box? (Part 2)

Show physical representation using real life example by revisiting the box example from previous lesson:

Materials: Four small opaque containers, four small items, two opaque containers big enough to fit two small opaque containers, Six post it notes to label each container with a color

Set Up Directions: Set up the activity before the class arrives following the directions below:

  1. Place one small item in each small container
  2. With the post-it notes, label the four small containers with different color names (red, orange, yellow, green)
  3. Place two labeled containers in each of the larger containers
  4. With the remaining post it notes, label one box blue and the other indigo.
  5. On the board, write the color names on the board to record the student tally.
  6. On the board, write the following pseudocode:
if numofBlue > numofIndigo
if numofRed > NumofOrange
open red box
else
open orange box
else
if numofYellow > NumofGreen
open yellow box
else
open green box

The Activity Directions

  1. Ask: “If you could choose one of these colors, which one would it be. Please only vote once.  Raise your hand if you would choose Blue. Record the number of students who voted for Blue on the board.
  2. Ask: “Raise your hand if you would choose Indigo.” Record the number of students who voted for Indigo on the board.
  3. Show the students the pseudocode on the board and work through the if/else statement using the the data collected from the class.
  4. Open the the box and display the contents of the box  the class voted for.
  5. Have students repeat the voting procedure to choose which smaller box to choose and show the object they chose

Brief discussion on nested conditional statements (15 min)

Demonstrate the coding process of the example below. 

Guided Activity 1 - Coding Example:  Write a program that evaluates a variable "age" and displays a group age category (you are not an adult, you are a senior citizen or you are an adult.)Suggested Instructional Strategy - Think Aloud - model your thought process for solving this problem.  Include comments in your code.

age = 18
if age < 18:
  print(“you are not an adult”)
else:
  if age is > 65:
      print(“you are a senior citizen”)
  else:
      print(“you are an adult”)

Brief discussion on chained conditional statements (elif) (5 min)

Guided Activity 2 - Coding Example:

Write a program that prompts the user for their age and displays their age category ( you are not an adult, you are a senior citizen or you are an adult.)  If they are older than 200 display a message that reads "humanly impossible".

age = int(input("How old are you"))
if age < 18:
  print("you are not an adult")
elif age > 200:
  print("humanly impossible")
elif age >= 65:
  print("you are a senior citizen")
else:
  print("you are an adult")

Check for understanding

Assign students random numbers from 0 - 250.  Have students decide what group they belong to (child, adult, senior citizen, not human) and explain why they made their choice.  *** You could have students physically move into the groups, hold up a sign with their answer or answer quietly in their journal.  

Activity (10 min)

Collaborative Coding (10 minutes)

  1. Review group work requirements: all members contribute, resolve conflicts internally before asking the teacher for help, facilitate the contribution of all team members. Work together to decide how to divide up the work so that all group members contribute significantly to the process. Suggested roles: driver/navigator, timer, tester, journalist (recorder).
  2. In your group, develop the pseudocode for the following problem:
        A year is a leap year if it is divisible by 4 unless it is a century that is not divisible by 400. Write a function that takes a year as a parameter and returns True if the year is a leap year, False otherwise.
  3. In your group, write the program for the problem.  

***Note 

It is recommended that:

All partners should be actively involved in the program development. For example, you may choose to employ Pair Programming, in which one partner “drives” (types and uses the mouse) while the other “navigates” (reviews and helps to guide what the driver is doing), with the partners changing roles every 20 minutes. Another method of collaboration is for each partner to develop pieces of the program, combine those pieces, and provide frequent feedback to each other during the development process.

-The College Board Computer Science Principles, Performance Assessment ©2014

 

Wrap Up (5 min)

Journal

Thinking about Nested and Chained Conditional Statements, answer the following questions:

  1. What difficulties, if any did you encounter during development of your program?
  2. What difficulties, if any, did you encounter with your partner.
  3. If any difficulties did arise, what do you think are some strategies to eliminate the difficulties
  4. What concepts in this lesson do you need clarified?

Options for Differentiated Instruction

 Extensions

Homework 

  • Extension can be assigned as Homework

Alternate Instructional Strategy:

  • For guided practice, have a list of list of instructions for how to write the example presented
  • Think Aloud - Model your thought process while solving the guided practice problems

Alternate Instructional Strategy: Interactive Journaling

  • Comment on the journal entry by asking check for understanding questions or clarifying any misconceptions students write about.

Evidence of Learning

Formative Assessment

  • A variety of checking for understanding techniques
    • Temperature checks
    • Teacher review student's code
    • Thumbs up/ thumbs down
    • Questioning throughout the lesson (whole group / small group / individual)
  • Quick quizzes
  • Peer review
  • Interactive journaling

Summative Assessment

Students will create a collaborative program demonstrating concepts introduced in this two part lesson. Students will be assessed using a rubric and will reflect on their learning in their journal

Lesson Summary

Summary

In this lesson, students will be introduced to the concepts of iteration and for loops.

Outcomes

  • Students will work through a guided tutorial on for loops while being introduced to using turtle graphics in Python.
  • Students will practice writing programs using for loops and turtle graphics.  
  • Students will journal as a reflective tool to make a personal connection between iteration and their personal life.  
  • Students will describe how computation facilitates the creation and modification of computational artifacts with enhanced detail and precision.

Overview

  1. Getting Started (5 min)
  2. Introduction of Content (40 min)
    1. Activity [10 min]
    2. Journal [5 min]
    3. Activity [10 min]
    4. Individual Coding [15 min]
  3. Wrap Up (5 min)

 

Note: Turtle graphic examples in this lesson work with the community version of the PyCharm IDE and Python 3.4.1.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.
  • 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 ELA:

  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

Students must understand that programs use the concept of iteration to perform repeated tasks.


Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How can computing extend traditional forms of human expression and experience?
  • 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?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • Turtle Graphics Guided Activity

Required materials:

  • 5-10 objects that can be stacked (lego, duplo blocks, plastic cups…) for the first guided activity

Useful additional resources:

Lesson Plan

Getting Started (5 min)

Journal: Think about events in your life that require a repeated action.  They could be something simple such as eating a bowl of cereal.  List two events in your life that require an action to be repeated.  What is the action?  What prompts the need for the action to happen? How often does the action happen?

Note: Students will extend their reflections later in the lesson.

Introduction of Content (40 min)

Guided Activity:  Physical representation of iteration [10 min]

Materials:  5-10 objects that can be stacked (lego, duplo blocks, plastic cups…)

The activity:  Place the objects on a table.  

1.Say: “At the conclusion of this activity, all of the objects will be stacked.”

Chose one object to begin with.

2. Say: “I will start with this object and I will continue to stack until there are no single objects left on the table.  How many times do you think I will stack an object?  Why?”

3. Ask: "Are there any single objects on the table?”

Students should answer yes.  Stack one object on your beginning object

4. Ask “ Are there any single objects on the table?”

Students should answer yes.  Stack one more object on your started stack.  Continue to ask if there are any single objects on the table until the stack is completed and there are no more single objects on the table. Keep a tally of how many times you repeated the process.

5. Ask: “How many times did we repeat the process?  Did your prediction match the result?"

6. Explain to the students how the activity represents the concept of iteration and continue into the discussion of iteration.

  1. Ask: “How much better is a computer at providing accurate and detailed results of a very long, repetitive process?" "Why is a computer able to be more precise and detailed?"

    Computers are used in assembly lines and other places with lots of repetition because they can be almost perfectly accurate thanks to sensors that can be calibrated to the millimeter, and without needing to take a break.

Journal [5 min]

Choose one of the events you wrote about in your previous journal entry.  Take a moment to write the pseudocode for the repetitive action associated with that event.

Note: Check for understanding while students are working.

Example: Eating a slice of pizza:

 While pizza on plate

      pick up from plate

      take a bite

      place on plate

      bite is consumed

      loop

Guided Activity (for loops, how for loops use lists, range, turtle graphic) [10 min]

This guided activity introduces students to for loops using turtle graphics.

(See handout in Lesson Resources folder: Turtle Graphics Guided Activity: The for loop)

Individual Coding Activity [15 min]

Give students the following code stem. Have the students alter the code to perform the listed tasks.

Code Stem:

import turtle    # Allows us to use the turtles library

window = turtle.Screen()  # Creates a window to display graphics

bob = turtle.Turtle()   # creates a turtle named bob

#Write your code here

window.exitonclick()      # Exits the window when clicked

1. Have the turtle draw a triangle using a turtle

2. Now that you know how to add turtles and program them to draw lines repeatedly, use your imagination and creative ability to create your own picture using multiple for loops and turtles.

Wrap Up (5 min)

Journal:  In your journal summarize the process you used to create your picture. What problems did you encounter? What concepts do you need clarified?

 


Options for Differentiated Instruction

Students can be given a copy of the guided activity handout to follow along.

 


Evidence of Learning

Formative Assessment

a variety of checking for understanding techniques

    • temperature checks
    • teacher review student's code
    • thumbs up/ thumbs down
    • questioning throughout the lesson (whole group / small group / individual)

quick quizzes

peer review

interactive journaling


Summative Assessment

Students will use for loops and turtle graphics to create graphic representations of iteration.   They modify a code stem using turtle graphics to: 

1. draw a triangle

2. draw a picture using multiple for loops and turtles.

Lesson Summary

Summary

Students continue learning about iteration by using while loops and nested iteration. Students work through a guided tutorial on while loops and learn more turtle graphics features.  They also have the opportunity to practice collaboratively writing programs using for loops, while loops, and turtle graphics.  Throughout the lesson, students are given the opportunity to use their journal as a reflective tool.

Outcomes

  • Students will know that iteration can be performed in Python using while loops.  
  • Students will understand that for and while loops can be written (nested) inside of other for and while loops.
  • Students will share the workload by providing contributions to an overall collaborative effort.

Outline

  1. Getting Started (5 min)
  2. Guided Activity (15 min) - for and while loops with turtle graphics
  3. Collaborative Activity (25 min) - Shared coding of an iterative program
  4. Wrap Up (5 min) - Journal Activity

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • 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 ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.9 - Synthesize information from a range of sources
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

  • Students will describe how iteration can be performed in Python using while loops.  
  • Students will demonstrate that for and while loops can be written (nested) inside of other for and while loops.
  • Students will describe programs that are developed for creative expression, to satisfy personal curiosity, or to create new knowledge and that these programs may be developed with different standards or methods than programs developed for widespread distribution.
  • Students will work together to facilitate collaborative work.

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • 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 people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • Guided activity: "Turtle Graphics Guided Activity: The while loop" in the Lesson Resources folder

Other:

Lesson Plan

Getting Started (5 min)

What will be displayed at the end of this program?

y=0
for x in range (0, 8):
   y += 1 print (y)

Introduction of Content (15 min)

  • Use the guided activity ("Turtle Graphics Guided Activity: The while loop" in the lesson folder) to discuss while loops and nested iteration.
  • To save time, have these programs open in your IDE before class starts.

Collaborative Coding Activity (25 min)

Have students work together to complete a coding activity that uses while loops, for loops, and/or nested iteration. Ideally, the students should design this program from scratch. They should think about a problem to be solved, describe it as an algorithm, and select the appropriate iteration structure. It is important to emphasize that the workload must be shared and each individual must make a contribution to the project within each group. Have students document an iterative design process: start with a general idea, break it into subparts, try it out, redesign, change and refine until you have explored a variety of creative options. The reflection journal at the end will comment on the group dynamics and problem solving used to create a positive group work environment.

Wrap Up (5 min)

Journal: In your journal, summarize the process that you used with your classmates to create the collaborative project. What was your original plan or algorithm? How did you use selection and iteration? What problems did you encounter? How did each group member contribute? What was the quality of the group dynamics? What concepts need to be clarified? How would these programs be changed if they were for widespread distribution rather than for personal use?

 


Options for Differentiated Instruction

  • Give students a copy of the guided activity instructions so they can follow along.
  • Possibly give students a code stem to work from for the collaborative project (while ensuring that they have the opportunity to problem-solve by thinking about and implementing an appropriate loop structure).

Evidence of Learning

Formative Assessment

Various checking-for-understanding techniques:

  • Temperature checks
  • Teacher reviews of student's code
  • Thumbs up/ thumbs down
  • Questioning throughout the lesson (whole group / small group / individual)

Quick quizzes

Peer review

Interactive journaling


Summative Assessment

Students will work collaboratively to develop a program that uses nested iteration and turtle graphics.

Lesson Summary

Summary

In Python, a function is a named sequence of statements that belong together. In this lesson, students learn why functions are used, how they are used, and how they are defined.  

Outcomes

  • Students learn how functions affect program flow, how functions use local variables, and how they use global variables.  
  • Students learn preferred means of communication with functions and how to incorporate them into their programs.  Attention is also given to debugging programs that contain functions.

Overview

  1. Getting Started (5 min)
  2. Guided Activities (35 min)
    1. Arguments and return values [5 min]
    2. Compound Functions [5 min]
    3. Function Definitions [5 min]
    4. Return Values [10 min]
    5. Line Numbers [10 min]
  3. Wrap Up (10 min)

Source

Students will work extensively with the online version of How to Think Like a Computer Scientist (HTLACS) hosted by Runestone Interactive. 

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP5: Use appropriate tools strategically.

Common Core Math:

  • F-IF.1-3: Understand the concept of a function and use function notation
  • F-IF.4-6: Interpret functions that arise in applications in terms of the context
  • F-BF.3-5: Build new functions from existing functions

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.10 - Read and comprehend science/technical texts

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

Students will understand the purpose of functions and how they allow a program to be built and maintained in a modular way.

Predictable Misunderstandings:

- students often think that functions (or any code) written will run.  They don't connect that it must be called in order to be run.

- students often think that functions have access to variables that they don't have access.


Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How are algorithms implemented and executed on computers and computational devices?
  • 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 does abstraction make the development of computer programs possible?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?
  • How does computing enable innovation?

Teacher Resources

Lesson Plan

Getting Started (5 min)

  1. Show first 3:30 of Function Video: http://interactivepython.org/runestone/static/thinkcspy/Functions/functions.html
  2. Students respond in their journals to the following prompts.
  • What is a function?
  • What is a parameter?
  • What are two types of parameters?

Guided Activities (35 min)

Arguments and return values [5 min]

  • Students read Python for Everybody  Chapter 4 Functions sections 4.1 to 4.3.  
  • Students copy the sentences below.  Replace the words argument and result with synonyms.
    • “It is common to say that a function "takes" an argument and "returns" a result. The result is called the return value.” 
  • Visit this web page (https://docs.python.org/2/library/functions.html) that lists the built in functions in Python.   
  • Verify that the Python Version is 2.7.
  • Ask, "How many built in functions are in Python 2.7?"
  • Change the Python version to 3.4.1.  How many built-in functions are in Python 3.4.1?
  • Why do you think there are a different number of functions in Python 3.4.1 than in 2.7?

Compound Functions [5 min]

  • Open Runestone Interactive Functions page (http://interactivepython.org/runestone/static/thinkcspy/Functions/functions.html) and read about user defined functions in Python.
  • Read through lines 1 and 2 that define the header and body of compound statements.  Note the format of the compound statement used to define a function.
  • Ask:
    • What color is used to highlight the keyword def?
    • What punctuation mark ends the first( header) line?
    • How far is the body indented?
    • What color is the name of the function?
    • What word is used for the value in parenthesis?

Function Definitions [5 min]

  • Run ActiveCode 1.  
  • Change the number in line 15 and run the code to make a smaller square.
  • Change the number in line 15 and run the code to make a larger square.
  • Run ActiveCode 2.
  • Ask: What are the two line numbers used to call or invoke the function drawSquare?
  • Run ActiveCode 3.
  • Change the definition of drawMulticolorSquare to different colors.
  • Ask: What line would you change to draw smaller multi-color squares?

Return Values [10 min]

  • Some functions find and return values.  Complete ActiveCode 5, 6 and 7.
  • Change ActiveCode 7 so it prints the minimum values.

Line Numbers [10 min]

  • Run CodeLens 1.
  • Ask:
    • What line is executed next after line 6?
    • What line is executed next after line 3?
    • How do you think Python knew what line to go to after line 3?
    • What keyword is used to tell Python to return a value from the function named square?
    • What do you think would happen if you run the program after removing the return statement from line 3?

Wrap Up (10 min)

  • Return to Python for Everybody Chapter 4 Functions  Copy and paste the code from section 4.4 to Runestone ActiveCode 4.
  • Run the code multiple times.
  • Ask:
    • What do you note about the results?
    • What is the name of the function used?
    • Is the function on the list of the built-in Python functions or is it defined in the program?
    • Where do you think the function is defined?
  • Add the number 1 as a parameter in the function call and run the program.
  • Explain the error message.
  • Write one thing to remember about functions on an exit note.

Homework:  Students should read Python for Everybody Chapter 4: Sections 4.7, 4.8 and 4.9.  Complete Exercises 2 and 3.  

Answer the following questions:

  •  What error message occured in Exercise 3?
  •  Why did the error occur?
  •  What happened when you change the order of print_lyrics and repeat_lyrics function definitions in Exercise 3?
  •  How is a function call like a road detour?
  • The parameter used to define the function print_twice is named bruce.  How would the function behavior change if the name was changed to wayne all three times it appears in the function definition?

Options for Differentiated Instruction

Students should be paired through this exercise since paired discussion is used for formative assessment.  Question can be provided to students through a variety of formats including production of a Google form or using student response systems.

Three suggested strategies are:

  • provide guide questions for reading
  • provide teacher provided annotated text excerpts
  • Students annotate text while reading

 

 


Evidence of Learning

Formative Assessment

After Activity D, have students compare results with their elbow partners.  Discuss any unresolved issues.  This strategy can be used after any check for understanding.

After Activity F, ask students to suggest a rule for creating functions that would help avoid this error.

Students work alternately between the web site, partners, and the whole group.  Teachers are to monitor student responses to the questions following each activity to be sure that students are addressing the key content within each activity.


Summative Assessment

  • Explain the advantages of functions/procedures in programming.
  • Explain the purpose of parameters with the use of functions.
  • Define a Python function with and without parameters.
  • Call a Python function with and without parameters.
  • Trace a function call from the main program to and from a user defined function.
  • Modify a Python program to use a function.
  • Create and use functions that return a string or a number.

Lesson Summary

Summary

This is the third session of a three-session lesson sequence with four topics covered by mini-lectures, explorations, and practice exercises.

Outcomes

  • Students will translate sample pseudocode into a Python function.
  • Students will recognize layers of abstraction for solving a Rubik's cube.
  • Students will identify sequencing, selection, and iteration elements in a problem solution.

Overview

  1. Getting Started (5 min)
  2. Activities (40 min)
    1. Guided Activity 1 [20 min]
    2. [Optional] Mini-Lecture 1 [20 min]
    3. [Optional] Guided Activity 2 [20 min]
    4. Mini-Lecture 2 [20 min]
  3. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP7: Look for and make use of structure.

Common Core Math:

  • G-CO.6-8: Understand congruence in terms of rigid motions
  • G-GMD.4: Visualize relationships between two-dimensional and three-dimensional objects

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience

NGSS Practices:

  • 2. Developing and using models
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)

NGSS Content:

  • HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering.

Key Concepts

An algorithm is more than just a sequence of steps: levels of abstraction are crucial to the working of algorithms, and sequencing, iteration, and other control structures are ubiquitous.


Essential Questions

  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How are algorithms implemented and executed on computers and computational devices?
  • How do computer programs implement algorithms?

Teacher Resources

Student computer usage for this lesson is: optional

In Lesson Resources folder:

  • AlgorithmsPseudocode3.pptx : PowerPoint Slides for mini-lectures
  • ConwayDoomsdayAlgorithm : file for "Day of the Week" algorithm, Conway's "Doomsday"

[Optional topic] Wikipedia article on Conway date algorithm.

Access to Youtube videos of people and Lego Robots solving Rubik's cubes.

Videos:

  •     CUBESTORMER 3 Smashes Rubik's Cube Speed Record by ARMflix 

https://www.youtube.com/watch?v=X0pFZG7j5cE and /or

  • CUBESTORMER 2 by ARMflix

https://www.youtube.com/watch?v=_d0LfkIut2M

  • Human World Record: Kopie Van Mats Valk Official Rubik's Cube Single 5:55 by Mats Valk

https://www.youtube.com/watch?v=UXrxRqwAUkA 

One or more Rubik's cubes.

Links to PDF copies of youcandothecube's solution to Rubik's cube (also copied into the Lesson Resources folder):

      You Can Do the Rubik's Cube

Lesson Plan

Getting Started (5 min)

Daily Homework Review

  • Review of pseudocode for determining if a year is a Leap Year 

Guided Activities (40 min)

  • Guided Activity 1
    • Discuss how abstraction involves removing detail and lets you describe things in a general way. Problems can be broken down from very general steps down to specific details. One way to do this is to extract common features from specific examples in order to generalize concepts. Look for this in the Leap Year code.
    • Demonstrate Python function implementation for the "Is it a Leap Year" pseudocode.
  • [Optional] Mini-lecture 1
    • Teach Conway "Day of the Week" algorithm. Use the file called ConwayDoosmdayAlgorithm in the Lesson Resources folder.
  • [Optional] Guided Activity 2
    • Have students practice the Conway algorithm.

Wrap Up (5 min)

  • Review Table of Contents of selected Algorithms book.
  • Review summary slide.
  • Homework: Take one of the youcandothecube.com solution stages.  Identify the sequencing, selection, and iteration elements.  Sketch a flowchart of that stage of the solution.

Options for Differentiated Instruction

For the optional activity (Conway Algorithm), some students may have difficulty adding and subtracting dates to translate from a known day-of-the-week to another day in the same month.  A chart on the wall, or a current calendar, could be a help.

Some students who are strong in other areas will have difficulty with the spatial aspects of manipulating a cube while retaining an orientation that will let them complete the steps of one of the sub-algorithms without errors.  They may need to be paired with another student or the instructor until they master the technique of holding the cube fixed while rotating a face.

The notation of face turning (e.g. R versus R' or L versus L') can be confusing.  Having the students practice with an empty jar with a lid can help.  Orient the lid up (U), down (D), left (L), right (R), front (F), or back (B).  The hand movement to screw the lid on is the same hand movement needed to perform the non-accented face turn.  The hand movement needed to screw the lid off is the same as the accented turn (U', D', L', R', F', B').

Variation for class that does not have Rubik's cubes:  Use the images from the Solution Guide: www.youcandothecube.com

Online rubik's cube solver:


Evidence of Learning

Formative Assessment

The following "Checks for Understanding" could be used to guide the students towards the three learning objectives.

Objective: SWBAT translate sample pseudocode into a Python function.

  1. Word Sort.  Students will evaluate isolated Python constructs as matching sequencing, selection, or iteration elements.
  2. Timed Pair Share.  Pairs of students will translate the challange examples from pseudocode into Python.
  3. Project Study Group.  Looking at pseudocode and non-working Python code:  What is wrong?  What is missing?  How would you change it?

Objective: SWBAT recognize layers of abstraction for solving a Rubik's cube.

  1. Describe it.  Students will first study and then will identify characteristics of Rubik's cubes (number of sides; possible movements; number and types of pieces -- center, edge, corner; ...)
  2. Predict and share -- students will predict strategies for solving the cube.
  3. Put in order -- groups of students will take a set of partially solved cubes and place them in "solution order".  They will justify their choice.  [Note: images from www.youcandothecube.com can be used if real cubes are not available.]
  4. Learn one layer.  Every student will learn how to execute one full step of the solution sequence.

SWBAT to identify sequencing, selection, and iteration elements in a problem solution.

  1. Students will identify the sequencing, selection, and iteration steps of: their homework algorithm; two of the sample problems from the challenge set; and one of the stages of the Rubric cube solution.  These will be done in pairs and small groups.

Summative Assessment

Students will translate prior pseudocode into Python routines.  They will recognize if their programs work correctly.

Students will deconstruct one of the Rubik's cube solution stages.  These analysis results will be shared and critiqued.

Lesson Summary

Summary

In the first portion of this lesson, students continue their inquiry into the properties of functions, with a focus on communication to and from other functions. In the lab portion of the lesson, students develop three Python modules using both Runestone Interactive and their Python IDE. Students use their own functions to perform calculations and draw a variety of polygons and a circle using turtle graphics.

Outcomes

  • Students will understand the process of communication with functions.
  • Students will be able to create and call functions.
  • Students will be able to use both "fruitful functions" (sometimes just called functions) and "unfruitful functions" (which do not return a value - these are usually called procedures).
  • Students will understand how functions simplify a project's creation.

Overview

Session 1

  1. Warmup (10 min)
  2. Exploring Functions (40 min)

Session 2

  1. Function Labs (45 min)
  2. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP4: Model with mathematics.
  • MP5: Use appropriate tools strategically.

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.10 - Read and comprehend science/technical texts

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 5. Using mathematics and computational thinking

Key Concepts

  • Students will understand the process of communication with functions.
  • Students will be able to create and call functions.
  • Students will be able to use both fruitful and unfruitful functions.
  • Students will understand how functions simplify a project's creation.
  • Students will work collaboratively in pairs to enhance performance and communication

Essential Questions

  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How are algorithms implemented and executed on computers and computational devices?
  • How are programs developed to help people, organizations or society solve problems?
  • How do computer programs implement algorithms?
  • How does abstraction make the development of computer programs possible?
  • How do people develop and test computer programs?

Teacher Resources

Student computer usage for this lesson is: required

Lesson Plan

Session 1

Getting Started (10 min)

  • Display Python for Everybody Chapter 4 (Functions) - Section 4.11.
  • Students record in their journals four reasons to use functions and discuss with elbow partners to identify their two most important reasons.
  • Ask students to identify two or three people they know who have the same name.
    • Explain to their elbow partners who the people are and how they tell them apart when talking about them.
    • Explain that we are going to working with functions today and that sometimes functions use the same names for different variables.
    • Before writing programs with functions, we want to address the possibility of functions that use the same names.

Exploring Functions (40 min)

Teaching Note: 

Use of a format such as Google forms is sugggested for collecting student responses to the questions for each activity. It is important to keep this portion of the class moving so students have enough time for the labs. Have students work with partners during their program development so they will have someone to share their progress with. Use a timer and have students briefly share their progress roughly every 10 minutes. This will not only help them understand an iterative development process, but also gives students practice with a collaborative development style.

Debugging

  • Display Section 4.12 of Python for Everybody.  
  • Explain: when progam developers write their own functions, they often run into problems (bugs) they need to fix. These debugging suggestions should help the students to prevent or correct problems.
  • As students investigate and work with functions today, they should an eye out for function design problems and strategies used to prevent or solve them. We will add the rules we develop to this list. 

Variables and Parameters

  • Students should open the Runestone Interactive Functions page (http://interactivepython.org/runestone/static/thinkcspy/Functions/toctree.html).
  • Have students read "Variables and parameters are local" and run the Codelens to completion.  
  • Ask:
    • What caused the error that occurred when the last line of the code was executed?
    • What happens to local variables when a function finishes?
    • Are parameter's values that are assigned inside a function also accessible outside the function? 

Global Variables (Don't Use Them!)

  • Run ActiveCode 9.
  • What is the value of the variable power inside the function?
  • At what point was the variable power given that value?
  • This form of communication is risky, since programmers may not realize that a variable used in one code segment is also used inside a function elsewhere in the program.  
  • What is the recommended way to communicate values to a variable?
  • Emphasize that avoiding global variables supports collaboration and reuse of code, since different authors can avoid interfering with each other's work.

Variable Scope

  • Complete the "Check for Understanding" after CodeLens 5, answering questions func-10, func-11, and func-12.
  • Share "Check for Understanding" results either with elbow partners or the class as a whole. 

Accumulating Values

  • Go to the section entitled "The accumulator pattern."
  • Do ActiveCode 10 and CodeLens 6.
  • After reviewing the execution in the CodeLens, answer the "Check for Understanding" questions func-13 through func-14.
  • See if the students can add any rules for creating and using functions to the list from Python for Informatics.

Functional Decomposition

  • Go to the section entitled "Functions can call other functions".
  • Do CodeLens 7 and ActiveCode 12.
  • Ask:  
    • What function is started first when the code in ActiveCode 12 is executed?
    • What function is finished first when the code is executed?

Session 2

Function Labs (45 min)

  • Review concepts from Session 1. Reinforce pair programming dynamics of navigator /driver, changing roles and communication goals to resolve any conflicts, and allow everyone to participate.
  • Encourage students to refer to the API to better understand how functions work. (Remind them that every high level programming language provides an API (Applicaiton Program Interface) that explains the functions available and how to use them.
  • Preview the three lab projects that students will complete and help students to get started with the Slope Y-Intercept project.
  • Complete the Slope Y-Intercept Project and the Drawing a Circle Labs.
    • The Slope Y-Intercept Project is described in the document of the same name.
    • The document includes descriptions of two functions to complete and contains a small sample of test data.
    • The Slope Y-Intercept Project is in the Lesson Resources folder along with the starter Python file.
  • Continue in Runestone to the Lab entitled Drawing a Circle (http://interactivepython.org/runestone/static/thinkcspy/Labs/lab04_01.html).
    • In this second lab, students develop a function that uses a turtle to draw a circle.
    • After finishing the lab, students should copy their code to a Python module in PyCharm.
    • Students should create three functions named drawSquare, drawTriangle, and drawOctagon, along with main module code that calls each function.
  • After completing the Drawing a Circle lab, students should follow the link below to the Lessons from a Triangle lab.
  • Students should create a second Python module with the code from the starting point for the drawPolygon function code and finish implementing the drawPolygon function.
  • Students should complete the Function Labs by developing the drawCircle function in Finally a Circle (the second half of the Lessons from a Triangle lab).
    • Additional components of the lab can be used as extensions for more able students.

Wrap-Up (5 minutes)

  • After submitting the labs, students present their labs with elbow partners and groups.
  • Students reflect on the following prompts about writing programs with functions.
  • What problems did they encounter? (with concepts or partner dynamics)
  • How did they overcome the problems? How was the API useful?
  • How do functions simplify the task of developing a program?
  • How can effective collaboration enhance performance?

Options for Differentiated Instruction

Iterative development works by developing, then sharing, programs at many points during the development process. Students should work in pairs as they create their programs and share the work through various completion stages.

Students who are completing projects quickly should be introduced to the Python turtle API at (https://docs.python.org/3.4/library/turtle.html). Students can investigate and implement such methods as fill, speed and others as described by the API documentation.  


Evidence of Learning

Formative Assessment

Check for understanding by assessing student performance on the Runestone Interactive questions. Students should first try to resolve any difficulties with their partners and groups.

Students should be able to make suggestions for creating and using functions.

Identify and address any areas discovered that students have been unable to come to a consensus understanding. 

Have students reflect on the pair programming process as prompted in the lesson.


Summative Assessment

Create functions that receive parameters, perform calculations using those parameters, and return a value.

Write a function to return the slope and y-intercept of a function of the line through two points.

Write functions to create a variety of polygons and a circle.

Lesson Summary

Summary

Students will use the online book Python for Everybody to complete a two-session guided lab in which they will explore the use of strings in Python.

Outcomes

Students will be able to:

  • Identify a string as a sequence of characters that are identified by their index value, beginning with 0 (zero)
  • Use the len function to get the number of characters in a string
  • Traverse strings using both while and for loops
  • Slice strings using [m:n]
  • Parse strings using the find method and slicing
  • Debug simple string programs to find and correct problems

Overview

Session 1:

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
    1. Preparation [5 min]
    2. Code Review [40 min]

Session 2:

  1. Getting Started (5 min)
  2. Guided Activity (35 min)
    1. Preparation [5 min]
    2. Code Review [30 min]
  3. Summative Assessment (10 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP7: Look for and make use of structure.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.10 - Read and comprehend science/technical texts

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

  • Strings are made up of individual characters in a sequence.  The characters are identified by their position in the string; this position is referred to as an index value.
  • Index values in Python begin with zero (0).
  • Python provides a number of built-in functions and methods that allow a programmer to manipulate strings.  
  • Strings can be traversed using both for and while loops. Students must decide which loop structure is appropriate, based on the nature of a program's requirements.

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are algorithms implemented and executed on computers and computational devices?
  • 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?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • Python for Everybody by Charles Severance, http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf.
    This book is available for download as a .pdf file. We recommend downloading the book and making it available on a shared group drive on local computers for easy access for students. Is it licensed under Creative Commons and is free to download and share.  A copy of the pdf is available in the Lesson Resources folder.

Other:

Lesson Plan

Session 1

Getting Started (5 min)

Journal Question: What is a string?

  • Have students share their ideas.

Guided Activity (45 min)

Preparation [5 min]

  • Students should open the book Python for Everybody by Charles Severance, Chapter 6: Strings (page 67). (Available at http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf and in the lesson folder.)
  • Students should launch PyCharm and make a new file called stringtester.py to test code as they go though the lesson.
  • Recommend teachers project their screens with the book and PyCharm environment when appropriate.
  • Have students test code samples from the book as the students and teacher go through the lesson together.

Code Review [40 min]

Section 6.1: A string is a sequence

  • Introduce the concept of index values for each character in a string, beginning with 0 (zero).
  • After reading the brief text in Section 6.1, have students type the sample code for fruit and letter with [ ] surrounding the index value of a letter and run it. Have students try to ‘break’ the code by typing in an index value too large for the word and see what kind of error they get.
  • Code check for understanding: have students type in a different word for their fruit variable and change the index value. Does the printed letter match what was anticipated?
  • Concept check for understanding: reinforce understanding by writing sample words on board, pointing to a letter at random and asking what the index value of that letter.
  • Repeat checks for understanding with made-up problems as needed.

Section 6.2: Getting the length of a string using len

  • Introduce the len function, which returns the number of characters in a string. Explain that empty spaces between words and punctuation also count as characters. Remind students of previous lessons concerning ASCII values for all characters, including blank spaces and punctuation.
  • Using the fruit variable from the previous sample, have students return the number of characters using the len function.
  • Stress the point in the book concerning IndexErrors: that the length of the string and the highest index value in that same string are not the same value. The length of the string banana is 6; the index values are numbered from 0 to 5, inclusive.
  • Code check for understanding: Have students type in sample code that will return the length of a variety of strings, with and without spaces and punctuation. Did their code run without error?
  • Concept check for understanding: Write a sentence on the board with spaces and punctuation. Have students count and write the “length” of the sentence on a post-it note and stick them on a designated place. Have a student or two organize the post-its based on the answers. Together with the class, count out the value of len, then have students type the sentence into the console in PyCharm to check their answers.
  • Repeat checks for understanding with made-up problems as needed. Some famous quotes can be used to keep it interesting, such as, "The artist is nothing without the gift, but the gift is nothing without work." - Emile Zola (1840-1902). 

Section 6.3: Traversal through a string with a loop

  • Introduce the concept of printing each character of a string on a separate line by using a while loop and incrementing the index value of each character.
  • Students should already be familiar with iteration using both while and for loops from previous lessons. Review syntax for both as needed.
  • Have students traverse the string by running the sample code.

Session 2

Getting Started (5 min)

Journal Question: Explain why the length of a string is one digit higher than the highest index value of the same string.

  • Have students share their answers. Guide the discussion back to the previous lesson, in which students traversed a string with a loop.
  • Share a sample of code similar to the traversal with a while loop from the last lesson and ask students to determine the output based on an evaluation of the code.  Example:
word = "alphabet"
index = 0

while index < len(word):
letter = word[index]
print (letter)
index = index + 1
  •  Remind students of the shortcut to increment index, using index += 1 in place of index = index + 1.

Guided Activity (35 min)

Preparation [5 min]

  • Students should open the book Python for Everybody by Charles Severance, Chapter 6: Strings (page 67). (Available at http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf and in Lesson Resources folder.)
  • Students should launch PyCharm and open the stringtester.py file used to test the code that they created during the last lesson. 

Code Review [30 min]

Section 6.3: Traversal through a string with a loop continued

  • Take students through a discussion of traversing a loop backwards by beginning at the end of the length of the string minus 1, and decrementing the loop control variable (index) instead of incrementing.
  • Code check for understanding: Book Exercise 6.1: Write a while loop that starts at the last character in the string and works its way backwards to the first character in the string, printing each letter on a separate line, except backwards.

Sample solution:

fruit = "watermelon"
length = len(fruit)
index = length - 1
while index >= 0:    letter = fruit[index]    print(letter)    index -= 1
  • Concept check for understanding: Project your code with errors and have students write the errors they find on post-it notes and stick them on a designated space. Have a student, or small group of students, organize the post-its in a way which makes sense to them. Debug the program together as a class based on the post-it note results.
  • Introduce the concept of using a for loop instead of a while loop to traverse a string.
  • Code check for understanding: Have students type sample code found at the top of page 69 in the book, using a for loop to traverse a string.
  • Concept check for understanding: Ask students to think about when it is more helpful to use a while loop than a for loop to traverse a string and share their ideas. Expect answers such as “it is easier to make a for loop” and “it is harder to move backwards through a for loop than a while loop.”
  • Explain that the word char in the example is used as a variable and is not a keyword in Python. It can be replaced with another word or letter. Have students use x instead of char in their sample for loop code to test this concept. This is an opportunity to have a discussion about using meaningful variable names so they have self-documenting code. 

Section 6.4: String slices

  • Students should return to page 69 in the book. Introduce the concept of slicing strings using the [n:m] syntax to indicate returning a string from the nth character to the mth character, not including the mth character.
  • Code checks for understanding: have students type in sample code which will slice strings in all the various ways covered in the section. For example:
print(fruit[0:3]) # returns app because a is in the 0th position and the second p is in the 2nd position.
                 # The slice goes to ‘p’ not including the ‘p’.
print(fruit[:3]) # Still returns app because a is in the 0th position.                  # Leaving the first index blank begins the slice at the beginning of the string,                  # and the second p is in the 2nd position.                  # The slice goes to ‘p’ not including the ‘p’. print(fruit[3:]) # Returns le because l is in the 3rd position.                  # Leaving the second index blank ends the slice at the end of the string. print(fruit[:]) # Returns apple because n begins at zero and m goes to the end of the string.
  • Concept check for understanding: answer the question for Exercise 6.2: Given that fruit is a string, what does fruit[:] mean?
  • Note: If you have time, you may want to go through Sections 6.5 - 6.9. Section 6.9 explains the difference between functions and methods, which will be useful when students use the find method while parsing strings.

Section 6.10: Parsing strings

  • Introduce the find method and apply slicing in this section.
  • As you go through this section, pay special attention to the find method. Explain that the find method returns the position at which the substring we are searching for begins.
  • Code check for understanding: Have students type in practice code other than what is in the book and use the find method without error.
  • Sample code:
message = 'Meet me at the clock tower @ 7:00 a.m.'
atSign = message.find('@')
print (atSign)


This code sample returns 27, indicating that the @ sign is at index value 27 in the string.

Journal: How are string functions used in everyday life? (search engines to find information quickly, school databases to look up student information, many more). How much more efficient is a computer at looking through millions of strings of data compared to a human? Extension: what if you were looking for a particular face in a crowd in a video, how could computational tools enhance that process?

Summative Assessment (10 min)

  • Coding assessment and/or quiz.  Alternatively, the assessment may be assigned as homework.

Options for Differentiated Instruction

Students can work in pairs while new concepts are introduced and practiced.

One advanced student could be assigned to be the "checker" for each row and have them raise a flag or something similar when they have checked off everybody in their row as having one small group of programming exercises complete and correct. Possibly offer a token prize to the winning row.

For example, after Section 6.3, the following exercise could be assigned:

  1. Everybody choose a different fruit. 
  2. Write code to display the first vowel in the name of the fruit and the first consonant.
  3. Display the length of the fruit.
  4. Print each character of their fruit name on a separate line by using a while loop.

Evidence of Learning

Formative Assessment

Code checks for understanding and concept checks for understanding are provided with each new function, method, or concept introduced.


Summative Assessment

Summative coding assessment:

  • Assign your first and last name to a variable.
  • Use the find method to locate the space between your first and last names.
  • Use slicing to isolate and print only your first name.

Sample answer code:

name = 'Pat Miller'
space = name.find(' ')
firstName = name[0:space]
print (firstName)

It is recommend that a 10-question multiple choice quiz that requires students to evaluate code samples from these lessons, determining the output or possible outcomes when the code is run be developed.

 

Lesson Summary

Summary

This lesson answers the question "What is a list and what can I do with one?". Students will find the answer to this question by exploring list operations and methods, as well as investigating how lists are modeled in real-world situations.

Outcomes

  • Students will create lists, access, and traverse elements within the list.
  • Students will perform list operations including insertion, concatenation, repetition, slices, and deletion.
  • Students will be introduced to list methods including append, insert, pop, sort, reverse, index, count, and remove.
  • Students will explore the Python API.
  • Students will use lists to model several real-world situations.

Overview

Session 1

  1. Getting Started (5 min)
    1. Introduction [3 min]
    2. Discussion [2 min]
  2. Guided Activities (40 min)
    1. Listy Linkys RolePlay [20 min]
    2. Python Documentation [10 min]
    3. List Slices [10 min]
  3. Wrap Up (5 min)
    1. Homework

Session 2

  1. Getting Started (5 min)
  2. Guided Activities (40 min)
    1. Lists are Mutable [20 min]
    2. Paired Programming [20 min]
  3. Wrap Up (5 min)
    1. Homework

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.
  • MP7: Look for and make use of structure.

Common Core Math:

  • F-IF.1-3: Understand the concept of a function and use function notation
  • F-IF.4-6: Interpret functions that arise in applications in terms of the context

Common Core ELA:

  • WHST 12.5 - Develop and strengthen writing as needed by planning, revising, editing, rewriting
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

NGSS Practices:

  • 2. Developing and using models

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • 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 does abstraction make the development of computer programs possible?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

Lesson Plan

Session 1

Getting Started (5 min)

Introduction [3 min]

Review the string commands. As they enter the class, hand students a copy of the Warm-Up Get Ready for Lists.docx that is found in the Lesson Resources folder.

Discussion [2 min]

Discuss: What is a list? (A sequential collection of Python data values; each value is identified by an index.)

Guided Actvities (40 min)

List Role Play [20 min]

See the file calld LinkyListy Role Play in the Lesson Resources folder. Note: You can change student names to students within your class.

 

Create a human “list of students”.  See the file called LinkyListy Role Play in the Lesson Resources folder. Note: The directions below are an example.  Change student names to students within your class.

Create a List of students by starting with an empty list and modify the list by following program below.


Designate a section of the board or a poster to act as the console/printer for output and a volunteer student to act as the printer driver.


Designate an area at the front of the room for the computer memory (and future students).


As students are called by the program, have each student come up to stand in front of the room where memory resides.


Have each student point to the student that follows them to form a linked list as they come to the front.

 

LinkyListy Role Play Program:
students = []
students.append('Joe')
students.append('Pat')
students.append('Alea')
students.append('Marta')
print(students)
#add additional commands to append or insert 4 or 5 more students
print(students)
print(len(students))
print(students[3])
students.reverse()
print(students)
print('David' in students)
students.sort()
print(students)
more = ['Tom', 'Laverne']
students = students + more
print(students)
pets = ['fish'*3,'dog']
del students[1]
del students[2:4]
students.insert(0, 'Jennifer')
students = students + pets
print(students)
print(students.index('Marta'))

Check for understanding: Ask students to give an example and then explain the effect of several of the List methods. For example, students.append(“Zoe”) would add Zoe to the end of the list of students. students.insert(4, “Larry”) would add Larry at index position 4 and slide everyone else down one slot. This could be done as a placemat activity. Use different colored markers for each student to write the example. Turn placement and ask the next student to explain the effect.

Notes:

  • Length of a list: print(len(students))
  • Accessing Elements: print(students[2])
  • List Membership (in, not in): print(“Mary” in students)
  • Concatenation and repetition (+ *):Make a list of more Python commands on sentence strips. On back of the sentence strip, write the output or trace of the statement after it has executed onto the back of the card. Have one student hold the deck of cards and cycle through them. Ask students to read a card and predict the output. Meanwhile, students who are in the list will change positions to demonstrate the behavior within the list. The holder of the card provides feedback or congratulatoins in checking the correctness of classmate's responses.
  • Include cards that model these behaviors:
more = ["Tom", "Laverne"]
students = students + more
pets =['fish'*3,'dog']*2 # creates a list of ['fishfishfish','dog','fishfishfish','dog']
  • List deletion using the delete operator: del students[2], del students[2:4]
  • List deletion using the List method pop: stu = students.pop(2), stuLast = students.pop(). The pop method pops (deletes and returns) an element at a given index or the last element if no index is provided.
  • Extension: additional list methods that may be useful and interesting: sort, reverse, index, count.

Access Python Documentation [10 min]

  • Check out the Python docs for Built-in Types.
  • Go to Section 4.6 Sequence types- list, tuple, range, and check out the sections on (4.6.1) Common Sequence Operations, (4.6.3) Mutable Sequence Types, and (4.6.4) Lists.  
  • Students need to realize that Application Programmer Interfaces (APIs) are an important resource for programming.
  • Identify list methods found in the API. (Link to resource:  Python API for Built-in Types)

List Slices [10 min]

  • Quickly resurrect your list of students.
  • This time, write names on the board.  
  • To simulate list slices, add each student’s age and hair color after each student’s name.
  • Yes, lists can contain different kinds of objects!
  • Ask students to copy the list and write the code to pull out a sublist that contains the second student’s name and info.

Wrap Up (5 min)

Discussion: How are lists the same and how are they different from Strings?

Homework

Have the students do the Runestone lab activities for Lists to reinforce the above concepts. (http://interactivepython.org/runestone/static/thinkcspy/Lists/toctree.html)

Session 2

Getting Started (5 min)

  • Create a list that contains the integers from 1 to 10.
  • Create the same list from an empty list using a loop.
  • Check for understanding: create a list that counts down from 10 to 1 and then adds “Blastoff”.
  • Reverse a given list.

Guided Activities (40 min)

Lists are Mutable [20 min]

Demonstrate that lists are mutable with the following activity

  • Create a list representing a horse barn containing 4 horses in 6 stalls.
  • Use the built-in constant None for the empty stalls.
  • Find an empty stall.
  • If there is an empty stall, place “Toby” in the Barn in that slot.
  • Also. see if a particular horse is in the barn or if he is out to pasture.
  • Exchange 2 horses in the barn. (Adapted from 2012 APCS exam question 3, page 13 of  http://apcentral.collegeboard.com/apc/public/repository/ap_frq_computerscience_12.pdf)

Paired Programming [20 min]

  • In a group of 2-3, make a zoo of animals.
  • Demonstrate the use of at least 6 different list operations and methods.
  • For a bonus, try to make a story with your code.  

Wrap Up (5 min)

Homework

Create a list of 5 students that contain the students' name, age, and hair color. Use a loop to extract the information for each student and print it out.

Teacher Note: Consider using the YumYumCupcake problem (see Formative Assessment) as part of tomorrow's opening exercises. 


Options for Differentiated Instruction

  • Use a canvas shoe bag to demonstrate a list.
  • Use a parking lot with numbered spaces as an example of a list.

Evidence of Learning

Formative Assessment

  • Create a quiz similiar to the role play. Use the answer chart provided as a template for the quiz. 
  • Check for understanding: Ask students to explain what the effect of the List methods append, insert, etc. For example, students.append “Zoe” would add Zoe to the end of the list of students? Students.insert( 4, “Larry”). Would add Larry at index position 4 and slide everyone else down one slot?
  • Check for understanding: Create a list that counts down from 10 to 1 and then adds “Blastoff”.
  • Let's visit the YumYum Shoppe: Create a list that has different kinds of cupcakes and simulate the actions that might take place during a typical day. For example, yumYumCupcakes = ["chocolate mousse" *3, "vanilla creme", "strawberry fluff", "chocolate mousse"*2]. Have a customer purchase a vanilla creme cupcake if there are any, check how many chocolate mouse cupcakes are in the display case, bake some more, and add them in. Drop one cupcake on the floor and throw it away.

Summative Assessment

Paired programming: Make a zoo of animals and demonstrate the use of at least 6 different list operations and methods. Try to make a story with your code.  

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)

Learning Objectives

CSP Objectives

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

Lesson Plan

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.


Evidence of Learning

Formative Assessment

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


Summative Assessment

Written assessment (see google drive)

Project Assessment (see google drive for project and rubric)

Lesson Summary

Summary

In this lesson, students will analyze what the Internet is and its basic functionality. Students will learn how the Internet works and how the implementation of the Internet has affected our society. They will discuss the idea of the Internet as a delivery service to get bits from one place to another.

For Homework students should have read and made brief notes on the following sections from the "Blown to Bits" book (Online book link: http://www.bitsbook.com/wp-content/uploads/2008/12/B2B_3.pdf):

  • "The Internet as a Communication System"
  • "Packet Switching"
  • "Core and Edge"

These sections are on pages 301-303 in the pdf version.

Outcomes

  • Students will explain the characteristics of the Internet and how the systems built on it influence their use.
  • Students will explain the difference between bandwidth and latency. 
  • Students will analyze relationships of data transfer over the systems within the Internet. 
  • Students will synthesize how data transfer and Internet systems are affected by the environment and needs of its users. 
  • Students will describe how communication paths on the internet are hierarchical and redundant. IP is hierarchical. Routing is fault tolerant and redundant.

Overview

  1. Getting Started (5 min) - Students discuss the difference between the Internet and a browser.
  2. Introduction (10 min) - Students explore how the Internet has grown over time .
  3. Guided Activity (20 min) - The path that the Internet uses to send and receive information is explored and diagrammed.  
  4. Demonstration (3 min) - The teacher presents the concept of bandwidth using different websites.
  5. Guided Activity (8 min) - The class discusses the uses of real-time Internet usage.
  6. Independent Activity (Optional)
  7. Wrap Up (5 min) - Students each present what they learned in the lesson.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP5: Use appropriate tools strategically.
  • MP7: Look for and make use of structure.

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.6 - Analyze the author's purpose in providing an explanation, describing a procedure
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • RST 12.9 - Synthesize information from a range of sources
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question
  • WHST 12.8 - Gather relevant information from multiple authoritative print and digital sources, using advanced searches effectively; assess the strengths and limitations of each source
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)

NGSS Content:

  • HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants.

Key Concepts

The Internet and the systems built on it have a profound impact on society. 

The Internet has many layers and was designed to be fault tolerant with redundant features.


Essential Questions

  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Lesson Plan

Getting Started (5 min) - Discussion: What is the Internet?

Start with a VERY brief class discussion: How does the Internet work?

Journal: what is the difference between the Internet and a browser? How are they connected?

  • Internet: A collection of systems working together to deliver data to the user. This includes email, video streaming, social media, websites, cloud storage like DropBox, etc.
  • Browser: Software applicaton designed to retrieve and display information from the world wide web, which is one part of the Internet, for the user. 

Introduction (10 min)

Part 1 - Activity (5 min)

(Use the optional Student Handout for Unit 3 Lesson 1 if desired to guide all of the activities in this lesson. There is an answer key to the student handout for teachers to use as well.)


Demonstrate, using the following resources, how the Internet has grown from the small ARPANET system to what it is today.

  1. ARPANET image: http://www.policy.hu/inetclass/arpaNet.html (from 1971)
  2. Today Show discussion on "What is the Internet?" (2:12 min):https://www.youtube.com/watch?v=95-yZ-31j9A 
  3. Image representing today's Internet: http://googlemapsmania.blogspot.com/2013/12/mapping-internet-of-things.html (Note: zoom in to see the details, investigate your local area you can see your own school, experiment, this is fun, have students find 4 different things of 4 different colors)

Part 2 - Discussion (5 min)

Discuss the following sections from the "Blown to Bits" book briefly (Online book link: http://www.bitsbook.com/wp-content/uploads/2008/12/B2B_3.pdf):

  • "The Internet as a Communication System"
  • "Packet Switching"
  • "Core and Edge"

These sections are on pages 301-303 in the pdf version.

Ask: How is all this information represented that is stored and sent on the Internet? 

Answer: binary. lead students to develop the concept that lower level abstractions can be combined to make higher level abstractions such as texting (SMS), email, images, sound or video. (ie: one byte can represent one note, put notes together to make a sound track. 6 bytes make 1 color pixel. Put pixels together to make a picture. Put sound and pictures together to make video)

Guided Activity (20 min)

Part 1 - Diagram (3-5 min)

Students create a diagram of how an email might travel from its start point to the end point.

Part 2 - Discussion (10-15 min)

Encourage an inquiry-based session where students use what they have learned to form a more complete picture of how the Internet delivers information.

  1. Discuss the flow of an email as a group. (Use this tool to supplement the understanding of the process:  https://www.youtube.com/watch?v=5Be2YnlRIg8  stop at about 50 seconds.
  2. What happens if one of the computers along the pathway loses power or is overloaded with data traffic? Point out that in case of problems there are many different paths (redundancy) that a message can be routed along and that everything on the internet has its own address (IP address) to be covered in upcoming lessons.
  3. Explain that packets are limited by "bandwidth" and "latency."
    1. The teacher may have the students read the following articles (both are relatively short) and lead a discussion after, or use them as resources for their own presentation. Measured in bits per second = how many bits arrive.
    2. An alternate activity would be to pass a message along one row a single word at a time, and then send it back across the room using multiple rows (paths) at once to demonstrate bandwidth. To show latency, have each student pass each packet under their chair before passing it on creating greater latency (delay) to get information from one side of the room to the other. Demonstrate how latency could be caused by a single slow link in the connection or overall slowness. 
    3. Latency: http://www.webperformancetoday.com/2012/04/02/latency-101-what-is-latency-and-why-is-it-such-a-big-deal/
      • Latency is the delay. How long you have to wait to send or receive.
    4. Bandwidth: http://www.coolnerds.com/Newbies/Bandwidth/Bandwidth.htm
      • Bandwidth is like the width of a highway, the more lanes you have the more cars can drive on the road at once
  4. How do the size and speed of the Internet affect the ways it is used? 
    • Emails now include pictures, video, multiple attachments because all the systems can store more and sent it faster.
    • At one time, people would wait all night for a photo to download, now they can stream video real time. The system has had to grow continuously to keep up with the demand for high speed content delivered almost instantly. Many systems have to grow: bandwidth is increased, more hardware is installed, more connections are created, more content is created and the demand keeps growing. Later in the lesson students can analyze the differences between geographical regions of packet usage to see how the quality and availability of Internet connects affect usage and demand. Keep in mind: the better the systems works, the more content it has, the more people want to use it and the more it must grow to keep up with demand. See the sad story of AOL who drummed up demand without first investing in infrastructure to support it and lost many customers who quicly because frustrated with slow and unreliable service.

Demonstration (3 min)

Demonstrate how to test bandwidth using the following sites: 

Guided Activity (8 min)

  1. Use the Internet Usages Guide in the Lesson Resources folder to lead a discussion of real-time internet usage
  2. Look at types of questions that could be answered based on this tool:  http://www.akamai.com/html/technology/nui/industry/

Independent Activity (Optional)

Students should use the tool to come up with a question that can be answered by the tool.  Students write an analysis that asks the question, answers the question and provide proof of why the answer is correct by providing screenshots of the tool in their report. ( http://www.akamai.com/html/technology/nui/industry/ ) or http://www.internetlivestats.com/ for live Internet stats.

(Note: Students can possibly start this assignment in class, but will likely need to complete as homework.)

Wrap-up (5 min)

In this activity, students will each share one thing they have learned from this lesson. This can be done in several ways depending on time constraints or disabilities. All students should participate in some way before leaving the classroom.  

  • Have all students stand. In order to sit back down, students must share one thing they have learned to the class. (This may happen organically, or in a prescribed order.)  
  • If there is a disabled student for whom the standup/sit activity would not be an option, develop an alternative way to indicate who in the class has answered (such as having them raise their hands).
  • If there is a student who has difficulty speaking in front of the class or there isn't sufficient time, hand out index cards on which each student must write what they have learned, to be handed in as an exit ticket to leave the class.

Options for Differentiated Instruction

  • Students can share comparisons of assignments in small groups. 
  • Students can further explore net usage (using http://www.akamai.com/html/technology/dataviz1.html) specifically targeting mobile usage and/or broadband usage by geographical regions. Analyze the differences between these geographical regions of packet usage.  

Evidence of Learning

Formative Assessment

Using a real-time network tool that measures the number of views per minute, students generate a question that can be answered using this tool. They will then collect the data and write a report that answers this question. The report should use current real-time screenshots for data and examples. (Note: Students can possibly start this assignment in class, but will likely need to complete as homework.)


Summative Assessment

Possible question(s) to use for a future test:

  • What is the relationship between bandwidth and latency?
  • When using Internet tools to display data, what are some important factors that need to be considered to better understand the information being displayed?

Lesson Summary

Summary

The Internet is growing to connect to everything we do in our lives. Over the years, it has grown from being a representation of static content, to web 2.0: a place where users interact to a collection of users and "things." In this lesson, the students will conceptualize devices that collect data and send it through the Internet. 

Outcomes

  • Students will understand the development of the Internet.
  • Students will understand how devices communicate on the Internet.
  • Students will imagine/design things (that don't yet exist) that could connect to the Internet.

Overview

  1. Getting Started (10 min) - Journal and discussion on devices that use the Internet.
  2. Guided Activities (35 min) - Students explore the "Internet of Things" through videos and readings.
  3. Wrap Up (5 min) - The teacher leads a discussion on class comprehension of the topic.

Learning Objectives

CSP Objectives

Common Core ELA:

  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

Key Concepts

The Internet is an ever-evolving system of increasing complexity. It has evolved from representing static information to providing interactivity of data between users and objects (things).


Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?
  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: optional

Students need access to paper for documentation.

Blown to Bits (Abelson, Ledeen, Lewis). Text is free as pdf: http://www.bitsbook.com/

Access to Internet connectivty for these links/videos:

In the Lesson Resources Folder:

  • "Commercial Python Project" Project Description Document
  • "Commercial Python Project Rubric" Rubric for the Commercial Project

Lesson Plan

Getting Started (10 min) - Journal / Discussion

  1. In their journals, ask students to identify as many objects in the room as they can that are connected to the Internet (or that would be more useful if they were connected to the Internet).
  2. Have students share with a neighbor. Then, communicate through a whip-around or a large group discussion. Generate a list of devices. 
  3. Review investigations of Internet usage statistics that the students completed in Lesson 3-1 (particularly useful if the students completed the investigation as homework).

Guided Activities (35 min)

The next three activities are used to generate ideas for examples of "things" that either are connected or could be connected to the Internet. 

Part 1 - Video (5 min)

Show the video (no audio except music) on how an average everyday person uses objects connected to the Internet in our current society: https://www.youtube.com/watch?v=ZgWbWCv0J5E  (3:58)

Summary: A day in the life of the Internet of things shows these things connected to the Internet: cell phone, thermostat in the house, car entry system and radio, car GPS intelligently looking for available parking, parking sensors on the ground using mesh networking (short-range connections to a larger deployment system in a central box), a heart rate monitor with results that can be viewed online in real time, a watch that connects with a cash register/inventory system, a package pickup system that connects with a drone to take the package directly to the customer.

Part 2 - Reading (5 min)

  • Before reading the article, ask students to find the ONE term used in the beginning of the article that many teens would not know (possible answer: ubiquitous)
  • Ask students to read the article: http://www.zdnet.com/the-internet-of-things-outlook-for-2014-everything-connected-and-communicating-7000024930/ (~2.5 pages)
    • See CSP_Unit2_Lesson2_StudentHandout and AnswerKey in the lesson folder for guided questions for students to answer and a teacher's answer key.
    • OR a simpler assignment would be to ask students to read only the introduction of this article (stop at "Big Data"), and answer these 3 questions:
      1. Who coined the term "Internet of Things" and WHEN? Kevin Ashton in 1999
      2. What was the very first "Internet of Things" -- the first "thing" connected to the Internet?  (Hint -- not the refrigerator!) The Coke Machine at Carnegie-Mellon University's Computer Science department
      3. What are three "far-reaching" implications of the "Internet of Things"? (answers will vary)

Part 3 - Video (5 min)

  • Show one of these videos about how data is generated by devices connected online : http://www.ibm.com/smarterplanet/us/en/overview/article/iot_video.html (5:25) 
    Summary: Tons of data has been generated; now it’s instrumented and documented. Billions of people and things are using the Internet: traffic sensors, flow rate monitors, more things on the Internet than people. It's a sea of data. DIKW triangle = data, information, knowledge, wisdom. When you apply intelligence, it transforms from one form to another (data into information, information into knowledge). The ideal day: your laptop knows your schedule so it knows when to wake you, chooses best transportation, preheats bathroom and warms up car, tailored communication on what's happening around you that affects you. If the parts could cooperate, they could make smart decisions about utility usage and other decisions. There are sensors everywhere--underneath your feet, in taxis, trains, and buses. If they communicate, then a serious water blockage could change traffic patterns to allow police to arrive quickly before a disaster strikes.
  • https://www.youtube.com/watch?v=uEsKZGOxNKw (2.25)
    Summary: visual display of how data is collected and visualized.

     

Part 4 - Discussion (5 min)

Ask students if there were any objects that they did not think about that are connected to the Internet. Adjust the list as needed. Analyze which devices would continue to be a high priority or useful if the ability to communicate on the Internet was suddenly diminished by an event like a hurricane or earthquake. Journal. Pair and share. What systems on the Internet are most critical? Which systems use a small amount of bandwidth but perform a valuable service? (Ex: twitter or texting in an emergency)What if the Internet was limited in size and only the wealthy could afford to connect and use it. How would it be different? Reiterate that the size and speed of systems on the Internet affect its use.

Small Group Activity (15 min)

With a partner, imagine a device that might someday be a part of the "Internet of Things," but currently does not exist. An example might be a shoe that has its own wireless acquired IP address and keeps track of how many steps one takes each day. (Note: This may already exist.)

As a small group, the students should submit a document answering the following questions:

  • What is the purpose of this device?
  • What data will your device collect?
  • What sensors will it use?
  • Who will make use of the data?
  • What will be the range of values needed to store the data?

This document should also include a sketch of the device.

Wrap Up (5 min)

Students display a thumbs up or thumbs down to this question: Did this lesson help you comprehend the concept of the Internet as an entity that is comprised of both people (users) and objects or machines?

Homework

Read Blown to Bits (Pg 303 - 306) -  IP Addresses - stop at "The Key to It All: Passing Packets."

Optional Project for Additional Python Practice ** Note: highly recommended!

The document in the Lesson Resources folder called "Commercial Python Project" is a project designed to give students Python coding practice and allow them to explore more about the "Internet of Things" by creating their own product commercial template. Consider adding the requirement that their program include conditional statements. Extra time will be needed.

The rubric for this project can also be found in the Lesson Resources Folder


Options for Differentiated Instruction

Ask students to think about and document how their selected device may have an impact on our daily lives. Could their be any controversy associated with their device or the use of their device? If so, what is that controversy? Students should document their opinions and/or findings.  

When selecting the pairs, aim for diversity of background, so the students learn how others view technology.


Evidence of Learning

Formative Assessment

With a partner, imagine a device that might someday be part of the Internet of Things, but currently does not exist.

As a group, the students should submit a document answering the following questions:

  • What is the purpose of this device?
  • What data will your device collect?
  • What sensors will it use?
  • Who will make use of the data?
  • What will be the range of values needed to store the data?

This document should also include a sketch of the device.


Summative Assessment

How does the Internet effectively connect devices and networks? 

How do devices and networks that make up the Internet communicate?

Lesson Summary

Summary

This lesson delves deeper into the structure of the Internet and routing protocols.  Students will explore the necessity of redundancy by using packets to transmit sections of data.  They will then discuss standards for packets and routing.  The class will simulate a network in which each student is a node through which they will send email packages from one node to another.

Outcomes

  • Students will explain how the Internet moves data from one place to another using routers.
  • Students will understand how data is encoded on the Internet.
  • Students will explain how large amounts of data are managed on the Internet. 
  • Students will be able to define protocol and TCP/IP

Overview

  1. Getting Started (10 min)
  2. Activity Pt A: Simulation of packet transfer (10 min)
  3. Activity Pt B: Simulation including lost packets (10 min)
  4. Discussion (15 min)
  5. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

Students will be able to:

  • Create a list of aspects of the Internet’s design that have helped it scale and flourish, and articulate how these aspects contribute to its growth.
  • Diagram the path of an email as it travels from one Internet user to another.
  • Explain why it makes sense to send data in multiple packets rather than all together.

Essential Questions

  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?
  • How is redundancy built into the Internet?
  • Who is in charge of the Internet?

 

Teacher Resources

Student computer usage for this lesson is: none

 1. Materials required

  • Post-It Notes - each student needs 10-20 Post-Its
  • Desks/Tables should be moved to form a grid such as a 6 by 6 grid.

 2. Copies to make

  • Teacher IP Address Locations - One for the teacher.
  • Student IP worksheet - One per student. Either hand these out after students are seated, or put one at each desk prior to the start of class. Make sure that the layout of the worksheets matches the layout of the Teacher IP Address Locations.

3. Digital resources (check for access)

4. Required background knowledge

Lesson Plan

Getting Started (10 min)

Journal

Prompt students to respond in their journals to one or more of these questions:

  • When you type the name of a website (URL) into your browser, how does the browser know how to find that website?
  • How does data get from one point to another on the Internet?
  • Who is in charge of the Internet.

Discussion: Invite students to share their journal entries.  The class should come to the general consensus that while their computer doesn’t know where to find everything on the Internet, it is able to pass information or requests from one location to another.  

  • As an analogy, describe the theory behind "six degrees of separation."  This theory states that if person A is told the name of one other person in the world (person B), then through no more than five individuals, one of whom is a personal acquaintance, person A will be able to contact person B. The choice of that personal acquaintance is key:  If you’re trying to find someone in France, it is better to ask a friend in France to find person B than to ask your neighbor (unless you already know that your neighbor has strong connections with the people in France near person B).  While the theory isn't precisely true, it is true that most real-world networks tend to have "hubs" (highly connected nodes (people who know many other people, or Internet nodes that are connected to many other nodes) and "spokes" (connections from hubs to individuals or nodes who are less well connected).
  • The internet is not run by any government or business but rather is run by the IETF. https://www.ietf.org/ The IETF's mission is "to make the Internet work better," but it is the Internet Engineering Task Force, so this means: make the Internet work better from an engineering point of view, not politics or government.

Activity Part A: Simulation of Packet Transfer (10 min) 

Transition Remark:  Previously, we looked at the general structure of the Internet and how it works.  Today, we will look more closely at the process of sending information between two locations using the Internet.  Let's see what this looks like through a video(Code.org packets) or World of Science video. (After video) We are going to simulate this same action by sending packets of information to each other without leaving our seats.

Introduction: 

  • Tell students that they will use rules, just like the Internet, called protocols.  Compare the process followed by the Internet to get information from one place to another to the algorithms that they created previously (inputs of some type are given to the algorithm; it performs the same process on any information given; and then it produces a result).  The protocols are applied to every packet of information that is sent. For this simulation, our protocol will have the structure “Recipient IP:____, part # of total, Sender IP:_____ “
  • On the Internet, the addresses are called Internet Protocol (IP) addresses.  These addresses are made up of three numbers, and often correlate to your geographical location.   Today, you will each be given an IP address consisting of three letters.  I have determined this address through your geographical location in the room. (As students participate in this activity, they will see the use of hierarchy.  Most of their packets that begin with the same letter will go to the same general region, although there are a few that break this pattern.)
  • Display the definition of TCP/IP (http://www.computerhope.com/jargon/t/tcpip.htm). Explain that there are many layers of protocols on the Internet from those that control hardware up to those that interact with application programs. Show the table of protocol hierarchy. (https://www.iplocation.net/tcp-ip)
  • Your goal is to send a letter that I will hand out to the correct IP address, but here is the catch:  Computers do not store the location of every IP address in the world.  They are given the IP addresses of other coputers that are connected to them.  Thus, you may only communicate with your neighbors to tell them your IP address. This must be done silently. (You may show them your IP address from your paper, or write it on a Post-It.)
  • You can also ask your neighbors (via Post-It note) who they have access to, and your neighbors can ask the same question of their neighbors.  In this way, you may find that you have access to someone else, but not know the route that the package must go to get there.  
  • On the back of your IP card, you have a table, which you should use to record how to get messages between yourself and different students in the class.
    • Example: We are going to attempt to transmit a package from B.B.A to C.B.D.  
      • Student B.B.A - ask neighbors if they are C.B.D, or can get there.  
      • This request should propagate through students until someone has found C.B.D.
      • C.B.D responds to their neighbor, who tells the neighbor who asked.  This repetition should continue until the news has reached the original sender.  B.B.A gives their message to the neighbor with the connection, and records on their paper who they went through to make the connection.
      • The message is passed on to C.B.D, who opens it, and reads it.
  • Hand each student paper to serve as "packets," and allow them to send messages to one another.  Make sure that they use the correct protocol on each message.  
  • Allow students to send packets that request information (what is your favorite ice cream, do you have siblings, etc.), and make sure that return packets are addressed and sent.

Activity Part B (10 min)

Transition Remark: Our simulation of the protocol system on the Internet has been relatively tame.  In reality, it doesn’t always work this nicely.  Sometimes packets are lost; not all the information you want to transmit fits in one packet; or some routers are unable to keep working.  Fortunately, the Internet is full of redundancy that allows it to keep working even if some parts fail to work, and we can send large data sets through multiple packets.  We’re going to run our simulation again, but this time living in the "real world."

    • Allow students to send messages to one another, but this time, as students transmit packets, mix them up a bit to simulate lost packets or unreadable data.
    • Require students to find information from one another, but give them a character limit (like a text or tweet) for each packet that requires them to use multiple requests to send the information.
    • Give IP cards some identifiable characteristic (print them on different color paper, put a sticker in the corner, etc.), and tell students with a particular characteristic that they are unable to connect to the network.  Ask the remainder of the class to try to send messages without them.  This will simulate the power of redundancy.

Discussion: How does redundancy of routers contribute to Internet fault tolerance? 

  • Some of your packets are getting lost!  Sometimes this occurs in the middle of a multi-packet message. This is very frustrating, especially when we do not know whether all of our packets were received.  How could we make our protocol system better in order for our Internet to run more smoothly?
    • This discussion should end with students deciding it would be nice to have a reply message such as "I got it!" with the number the packets that went together (1 of 3). The teacher should allow students to come to this conclusion on their own, but you may need to push them in this direction.
  • Return to simulation, test your new protocols. (Spend no longer than 5 minutes.)

Discussion (10 min) 

Transition Remark: We just participated in a simulation that allowed us to become nodes within the Internet.  By filling out the back side of your IP worksheet, each of you was essentially becoming a router.  Each routers contains a configuration table with information that it can use to send packets to the correct location.  

Discussion: 

  • What is the role of the IP address for each device on the Internet?
  • How does redundancy of routers contribute to the Internet’s ability to scale to more connections?
    • Students will need to extrapolate from their understanding of the simulation to answer this question. 

Conclusion: This information should be written in the student's journal.

  • We have simulated some protocols used to transfer information across the Internet.  However, there are other protocols that are necessary for sharing information and communicating between browsers and servers on the Web.  These include information exchange (HTTP protocols) and secure sockets layer/transportation layer security (SSL/TLS).

Wrap Up (5 min)

Reflection: This may be completed as an exit ticket for formative assessment or in student journals.

  • In the activity, what happened when you tried to send out packets of information?
  • What worked in the activity and what did not work?
  • Make comparisons between what happened in the activity and what actually happens as data moves on the Internet.

Options for Differentiated Instruction

Routers

  • Research how routers use IP addresses to know where to send packets of information. Write one paragraph, a poem or rap, or create a diagram to communicate what you learned on the topic.

Traceroute

  • Use a Traceroute utility to trace the path that a packet takes to get to your computer. Create a flowchart/path diagram to record what you learned.

Code.org Lesson


Evidence of Learning

Formative Assessment

Assessment will occur informally through the discussion questions:

  • What is the role of the IP address for each device on the Internet?
  • How does redundancy of routers contribute to the Internet's ability to scale to more connections?

 

Reflection questions for journal:

  • In the activity, what happened when you tried to send out packets of information?
  • What worked in the activity and what did not?
  • Make comparisons between what happened in the activity and what actually happens as data moves on the Internet.

Summative Assessment

Assessment Questions:

Explain the role of the Internet Protocol address for each device on the Internet.

Why is the assignment of an IP address critical to connecting a device to the Internet?

How does Internet router redundancy contribute to Internet fault tolerance?

How does redundancy of routers contribute to the Internet's ability to scale to more connections?

Explain how relatively small packets are used to transmit large files on the Internet and identify what information each packet must possess.

Identify a standard protocol for Internet packet communication.

Lesson Summary

Pre-lesson Preparation

Students must complete the pre-reading assignment: Blown to Bits (pages 303 - 306 in the PDF). They should read the sections about DNS, Protocols, and IP Addresses.

Summary

The purpose of the Domain Name System is to resolve domain names to IP address for computers on the Internet.

For the next two lessons, students will investigate the workings of the Domain Name System (DNS). They will then design and enact a simulation of DNS.  Students will use their simulation to request and receive web pages, implement DNS caching, and investigate DNS poisoning.  

Outcomes

  • Explain the abstractions in the Internet and how DNS supports Internet functions.
  • Explain the hierarchical characteristics of DNS.
  • Explain how IPv4 and IPv6 addressing are used to identify and connect computers on the Internet.

Overview

Session 1 - Introduce DNS

  1. Lesson Introduction (5 min) - Introduce DNS.
  2. Guided Activity (40 min) - Students investigate elements of DNS and sketch its components.
  3. Closing (5 min) - Watch improvisation video.

Session 2 - Create DNS Improvisation

  1. Introduce Simulation/Improvisation (5 min).
  2. Guided Activity (40 min) - The roles and scripts for the next lesson’s activity are set up.
  3. Closing (5 min) - Journaling about the characteristics of DNS and the Internet.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP5: Use appropriate tools strategically.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 2. Developing and using models
  • 3. Planning and carrying out investigations

Key Concepts

Students describe characteristics of the Internet that influence the systems built on it. 

Students explain how computers can be used to get a web page from a new web server.

Students work as part of a collaborative group using effective communication to accomplish a task.


Essential Questions

  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?

Teacher Resources

Student computer usage for this lesson is: required

Blown to Bits (either electronic or hard copy)

Access to the Internet for these sites:

Excel or similar software 

"DNSWorksheet" document and "Favorite Domains (Sample List)" spreadsheet in lesson resources folder

 

Addtional Resources

https://studio.code.org/s/netsim Code Studio Internet Simulator

Student friendly explanation of DNS  https://studio.code.org/s/netsim 

Lesson Plan

Session 1 - DNS Introduction

Getting Started (5 min) - Introduction of DNS

  1. Students will watch this video https://www.youtube.com/watch?v=72snZctFFtA from 0:47 to 3:22 to introduce the function of DNS.
  2. Students should consider the video and the pre-lesson reading to answer the following question: "What is the purpose of the Domain Name System?"
  3. After the students have finished journaling, the teacher should give these explanations to clarify DNS and further set up the lesson:
    • The purpose of DNS is to resolve domain names to IP address for computers on the Internet.
    • Our purpose as a class is to understand what DNS means, how it works, what benefits it provides, and some challenges it faces.

Guided Activity (40 min)

Part 1 (30 min) - Investigation

Version 1 - If students have access to the system console window, use it to complete the following steps.

Directions for Host Configuration and DNS in Action Using the Console Window:

  1. Console Based Use: (cmd prompt)
  2. Find your host’s IP address: (ipconfig)
  3. Find the IP address of the default gateway (ipconfig)
  4. Find the physical address of the default gateway (arp –a)
  5. Resolve domain names: (nslookup)
    • google.com
    • umbc.edu
    • domain.name
  1. Domain names recently resolved: View the HOST DNS cache (ipconfig /displaydns)
  2. Unknown domain names: Find the IP address of the local DNS server: (ipconfig /all)

 

Version 2 - If the Console is blocked for your students, you can still demonstrate most of the console commands on your computer.  If it is blocked for you as well, use a web site such as  http://pingtool.org  and the prompts below.

Note: If the Console is blocked, students will need a way to obtain unique IP addresses.  A document named "DHCP Simulator" (in the lesson folder) contains 30 unique IP formatted addresses.  Print and cut out the blocks and allow a student dubbed DHCP to give them out at random. 

Directions for Host Configuration and DNS in Action Activity Without the Console Window:

  1. Find your host’s IP address: (just search for get ip address).  Survey student results and explain that the values are the often the same because the network uses one computer to make connection outside the local network.
  2. Watch the first 40 seconds of DNS Cache Poisoning (https://www.youtube.com/watch?v=1d1tUefYn4U)
  3. Use traceroute to find the number of routers (hops) involved in getting to apcsprinciples.org.
  4. Resolve domain names: (nslookup)
    • google.com
    • umbc.edu
    • domain.name
  5. Domain names already resolved: Copy the IP addresses to a browser’s web address bar and visit two of the domains from number 4.
  6. Unknown domain names: Review the traceroute results to each domain.  What is the IP address of the default gateway?

 

During the investigation, students should answer the following questions in their journal:

Journal Questions for Version 1:

Students should attempt to answer these questions based on the previous activity:

  1. How do you access a command prompt?
  2. What console command do we use to find our IP address and the IP address of the default gateway?
  3. How can we find the physical address of the default gateway?  
  4. How do Internet bound packets get to the default gateway?
  5. How can we look up (resolve) unknown IP addresses from the console?
  6. How can we see a list of the domain names and IP address already resolved by our host computer?
  7. How does your computer resolve unknown domain names into their addresses?
  8. The number of devices that could use an IP address has grown so fast that a new protocol (IPv6) has been established to handle routing of many more devices. How do you think IP addresses have changed?

 Suggested Answers

  1. In Windows, click Start>run then type cmd.
  2. At a console prompt, type ipconfig.
  3. At a console prompt, arp -a.               
  4. IP packets are sent inside physically addressed frames.
  5. Use nslookup followed by the domain name.
  6. At a console prompt, ipconfig /displaydns
  7. The computer obtains the IP address by requesting it from the local DNS server.
  8. The world officially ran out of the 4.3 billion available IPv4 addresses in February 2011. Yet, hundreds of millions of people and devices are coming online. IPv6 is what will allow this, providing enough addresses (2128 to be exact) for everyone and all of their various devices. from the Internet Society http://www.internetsociety.org/what-we-do/internet-technology-matters/ipv6 )

Journal Questions for Version 2:

Students should attempt to answer these questions based on the previous activity:

  1. The Console is just one tool that can be used to find a computer's actual IP address.  How is the Console accessed on your computer at home, if you have one?
  2. Why does pingtool.org not give us our real IP address?
  3. What is the role of the local DNS server?
  4. What is the purpose of the routers on the Internet?
  5. Why did domain.name not resolve to an IP address?
  6. What do we call the list of domain names and IP addresses already resolved by our host computer?
  7. How does a computer resolve unknown domain names into their addresses?

Part 2 (5 min) - Video

  1. Students will watch this video https://www.youtube.com/watch?v=72snZctFFtA  to show the function of DNS.
  2. Give students a copy of the DNS worksheet.

Closing Activity (5 min) - Journal

Have students pick one or more of the following questions to answer in their journals:

  • Just as the original Internet developers did, we are using a trust model - assuming everyone is cooperating.  Why do you think we used a trust model?
  • The Internet’s end-to-end architecture makes connecting to it simple.  Why do you think an end-to-end architecture encourages invention and innovation of Internet-based systems?

 

Optional Activities:

 

Diagram (10 min) 

Put the following list of DNS and other devices on the board.  As a class, students are to create a diagram of the way devices 1 – 5 interact to resolve domain names (similar to the last picture in the overview.)  Have students draw the picture on the board and agree that it is correct before they write it in their journals. 

  1. Host
  2. Local DNS
  3. Root
  4. Top Level Domain
  5. Authoritative Name
  6. Web Server
  7. Router

 

 

All the world is a stage, and all the men and women merely players (55 minutes)

 

Getting Started/Introducing Activity (5 min)

The teacher will explain the following activity to the students:

  1. We are going to simulate the function of DNS as used to obtain web pages on the Internet, creating a sort of improvisational play. 
  2. Just as the original developers did, we will use a trust model:
    • Assume everyone is cooperating.
    • Use an “end-to-end architecture” that keeps the center of our network as simple as possible. 
    • (Have students record both of these characteristics of the Internet in their journals.)
  3. Together with DNS, web servers, and Internet routers, students playing the role of each device will request, resolve, and deliver web pages. 
  4. Along the way, we will likely run into several problems and failures (learning opportunities).  As we do, we will resolve them together and record our insights in our journals.

 Show DNS explained (https://www.youtube.com/watch?v=72snZctFFtA) 3:20 - 5:39.

Guided Activity (40 min) - Improvisation Activity

Part 1 (30 min) - DNS Device Roles

  1. Have students watch "The Way of Improvisation" https://www.youtube.com/watch?v=MUO-pWJ0riQ
  2. In small “author” groups, have students prepare scripts for students who will play a device. 
    • Each group creates a card or page for their device. 
      • One side of the page contains the device name and an explanation of its role.  (The explanation is to be brief – fewer than 25 words but enough to give a non-expert the general idea of the role of the device.)  
      • The other side of the paper contains a more detailed explanation of the service the device provides, including the devices with which it communicates, a list of the data required for the server to function, and an explanation of how the data is initially acquired.
  3. Each group should print one draft copy of their scripts.  Students share (rotate) their device scripts with another group. 
  4. Each group makes constructive criticisms and returns scripts to their authors.  (If time permits, you may want to repeat this round.)  Review groupwork norms that encourage respect of multiple perspectives.
  5. "Author" groups make revisions and print 4 copies of each device page.  (Use front and back of the paper if possible.)  
  6. Collect these and keep them sorted by device.

Part 2 (10 min) - Web Servers

Teachers will explain that the Internet is much bigger than the Web, but for our simulation purposes, we will only be trying to access web pages from web servers. 

  1. Depending on the size of the class, pick two or three domain names to simulate, such as .com and .net. Select two domains from each top-level domain.  (For instance, for .com, you might select google.com and amazon.com.)  
  2. Divide the class into groups such as the "google group", the "amazon group", and the other subdomains selected. 
  3. Each student in each group finds a unique page from their second-level domain and prints two copies of the first page of the web page each student selects. 
  4. Have students write a one-word title for their page on the top of the paper and submit it to you, placing the pages in piles by subdomain.

Options for Differentiated Instruction

When pairing up students in "Think - Pair - Share," use a random generator such as random.org (use list tool) to randomly pair students. 

 


Evidence of Learning

Formative Assessment

Students create a list of things in their lives that are identified by unique numbers.

 

 


Summative Assessment

1. End to End Architecture 6.1.1B
A. Describe the “end to end” architecture of the Internet.
B. Explain how the “end to end” architecture facilitates connection of new devices.

2. Internet Names and Address Rules 6.1.1 E 
A. Describe how computers are uniquely identified and connected on the Internet.

3. DNS Function 6.1.1 G
A. Briefly explain the primary use of the Domain Name System made by users of the Internet.

4. DNS Hierarchy 6.2.1 B
A. Describe the hierarchy of the Domain Name System.

 

Lesson Summary

Pre-lesson Preparation

This lesson will require some room setup or prep for best delivery of instruction. Some of the setup should have been done in the previous lesson.

Summary

In this lesson, students will expand their knowledge of how the Domain Name System (DNS) works by acting as a class to simulate the use of DNS to retrieve web pages.

Once the simulation is functioning students enhance its efficiency through the use of caching.

Poison the DNS cache by adding false DNS replies (DNS poisoning).

Students discuss with their groups how DNS works and how it supports Internet growth.

Then they explain in their journals how:

DNS works

Caching is both a benefit and a security risk.

DNS supports Internet growth.

In this lesson, students will expand their knowledge of how DNS works by acting out a simulation of DNS in action and using it to retrieve web pages. This is a two-session lesson. The first session is for students to get the simulation functioning, with the teacher serving as director.  As students realize they need to "fix" their implementation of the simulation (modify their scripts), they record the insights in their journals. 

In Session Two, students take on different roles and conduct a dress rehearsal that is entirely student-led. Teachers then introduce DNS caching and DNS poisoning. Once the simulation is functioning, students will address both increased efficiency due to DNS caching, and cybersecurity concerns associated with DNS.

 Outcomes

  • Students will explore how the characteristics of the Internet influence the systems built on the Internet. 
  • Students will understand that Domain Name Servers (DNS) are essentially the "address book" of the Internet and store information to help Internet systems route requests and replies. 
  • Students will be able to explain how DNS hierarchy supports scaling on the Internet.
  • Students will identify existing DNS cybersecurity concerns and potential options to address these issues.

Overview

Session 1 - Acting the Simulation

  1. Lesson Introduction (5 min) - Students assign the cast and collect necessary data.
  2. Guided Activity (40 min) - The teacher directs the first rehearsal of the play and introduces changes in IP and DNS.
  3. Closing (5 min) - Think-Pair-Share

Session 2 - Round 2 of Simulations

  1. Dress Rehearsal with Improvisation (15 min) - Practice Play
  2. Rehearsal with Video (30 min) - Perform Play and Discuss DNS Caching and Poisoning
  3. Closing (5 min) - Summary Report

     

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP5: Use appropriate tools strategically.
  • MP7: Look for and make use of structure.

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

Key Concepts

The characteristics of the Internet influence the systems built on it. 

Domain Name Servers are essentially the "address book" of the Internet and store information to help Internet systems route transmission requests and replies.

 A list of character protocols is provided as a resource.  These may help students learn their roles.


Essential Questions

  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?

Teacher Resources

Student computer usage for this lesson is: required

This lesson requires extensive preparation.

Acquire:

24 envelopes per class – one or two per host per rehearsal and production.

Post-it Notes

One color for students to use to self-select roles.

One color for students to use to record DNS information.

One color for students to use to initiate requests.

Print:

One copy of character protocols for each student.

One copy of Routing Table.docx for each student router.

One copy of DNS cache for each root, TLD, ANS and local DNS server and each host.

Four copies of each device/character role page (web, router,  root, TLD, ANS and local DNS and host).

Three or four copies of the first page web page, grouped by domain.

 

Lesson Plan

Session 1 - First Rehearsal (Part 3 of DNS Section)

Getting Started (5 min)

Warm Up:

Distribute post-it notes to each student.

  • Students find their IP addresses and write their name and IP address on the post it note. 
  • Display the DNS device list on the board and use it to review the process by which DNS resolves domain names.

Casting Characters:

Beside each device listed on the board, there should be the number of students needed to play each role.  As soon as students complete their post it notes, have them choose their role by placing the post it notes next to the device name. 

Below are suggested numbers of actors per role for two class sizes.  Students take their seats and add their name and IP address to their router table.  

Device List

16 Students

30 students

Host

4

8

Local DNS

2

4

Root

1

1

Top Level Domain

2

3

Authoritative Name

4

6

Web Server

4

6

Router

1

2

 

Once students select a role, each device group should meet briefly to discuss what information they have to collect from the post-it notes on the board. They will go and obtain either a script that informs them what to do during the play, (how their device works) or all the printed web pages from their server.  

 

Gathering Data:

Post this list of directions and allow devices to go to the board and obtain the required IP address information.

Before the play can start, these seven sets of data still have to be collected.

  1. Web servers (students) need to "advertise" their web pages by making a list on the board of the web pages (one word per page) they have to offer.
  2. Hosts and DNS servers complete a routing table for their table and give the routing table to their router.
  3. Local DNS servers need to share their IP address with hosts.
  4. Top-level domain servers need to share their domain names and IP addresses with the root server.
  5. Authoritative name servers need to share their domain names and IP addresses with the top-level domain servers.
  6. Web servers need to share their IP addresses with their authoritative name servers.
  7. Routers need to complete the routing table for their group using the routing table (Routing Table.docx) provided.

 

Guided Activity (40 min) - Guided Rehearsal

Part 1 (30 min) - Rehearsal 1

Notes:

  • During Round 1, the director can stop the action, provide direction, and restart the action.  
  • Actors should make notes in their journals of any stage directions, and make any changes or corrections to their scripts/role sheets as needed.

Steps to complete the play:

  1. Select one Host to start. Hosts:
    1. Select a web page to request. 
    2. To get the IP address of the web server, the HOST writes the domain of the page requested on a post it note, placing the request in an envelope, does not seal it, addresses the outside of the envelope (both from and to IP addresses), and sends the envelope via the Internet router.
  2. Routers:
    1. Verify the address are correctly formatted and forward the envelope using their routing tables. 
    2. Return envelopes not addressed properly – during dress rehearsal.
  3. When the root server gets the request, it:
    1. Opens the envelope.
    2. Reads the top-level domain.
    3. Writes the IP address of the proper TLD server on the post-it note.
    4. Uses the return address on the envelope to send it back to the local DNS server.
  4. The local DNS server:
    1. Opens the envelope.
    2. Uses the IP address to readdress the question to the appropriate TLD.
  5. The TLD server:
    1. Repeats the process; writing the IP address of the proper ANS on the post it note.
    2. Addresses the envelope back to the local DNS server.
  6. The local DNS server:
    1. Opens the envelope.
    2. Uses the IP address to readdress the question to the appropriate ANS.
  7. The ANS:
    1. Writes the IP address of the desired web server on the post it note and circles it.
    2. Sends the envelope back to the local DNS server.
  8. The local DNS server:
    1. Opens the envelope.
    2. Upon finding a circled IP address, it sends the envelope back to the HOST.
  9. The HOST:
    1. Opens the envelope and replaces the post-it note with a request containing (only) the name of the web page desired.
    2. Addresses it using the circled IP address.
  10. The web server:
    1. Receives the envelope.
    2. Opens it and replaces the post-it note with a printed version of the requested page.  
    3. Readdresses the envelope to the HOST.
    4. Sends the page back.
  11. Simulation completed! Celebrate when the requested web page arrives. Have everyone take a bow.

 

Part 2 (10 min) - Changes in DNS

Explain:  Both domain names rules name and IP address rules have changed over time.

Have students watch these two videos: 

Afterwards, they should record responses to these two prompts:

  • How are naming rules changing and why?
  • How are IP address numbers changing and why?

Closing (5 min) - Think-Pair-Share

  1. Before Round 2 (the dress rehearsal), have students make entries in their journals of any lessons learned. Have them share these lessons first with elbow partners, and then in groups.
  2. Collect all scripts and web pages.
  3. Present the DNS lesson summary project (DNS Summary).

 

Session 2 – Dress Rehearsal 

Dress Rehearsal with Improvisation (15 min)

Set the stage:

Distribute scripts, envelopes, and post-it notes.

  • The rehearsal process repeats from the previous session; however, students are to select a different role and to work out on their own the simulation/improvisation.  

Note: Use the character protocols from the previous session during the dress rehearsal, especially if the students are struggling.

  • Select a host at random to start by requesting an available web page.  A little later, cue a second host.  If the system is working, cue a third host.  Go slower if needed. 
  • Return the web pages to the web servers. Before going live, give students a chance to ask any questions and to record any observations in their brain books.

Rehearsal with Video (30 min)

Part 1 (20 min) - Opening Night (If the show is ready)

This play is improvisational with Hosts requesting whichever pages they want.  Restart the system with all Hosts online.

  1. Video the full DNS-based Web system in action. 
  2. Make a second video of the system acting slowly with only one Host.  In the second video, have students narrate their actions.
  3. Introduce the use of DNS caching. 
  4. If time permits, add the use of DNS caching to the system. (Have students request a number of pages from the same domain, so pertinent cached values accumulate quickly.  If time is short, brainstorm benefits students anticipate for DNS caching.)
  5. Have students record the benefits of DNS caching.

Part 2 (10 min) - Attack

Introduce the security problems associated with plain text messages and with DNS poisoning:    

Students will research this topic and report on security issues (among other aspects of DNS) in their summary report.

Closing (5 min)

If the previous lesson has not been assessed, assign the entire summary in the document entitled "DNS Summary."


Options for Differentiated Instruction

The simulation will be acted out at least three times.  Students should change to a new role each time.

Use the character protocols during the dress rehearsal.

 


Evidence of Learning

Formative Assessment

Students are to reopen their spreadsheets from the previous lesson.

Show the students how to create a simple "if statement" in a spreadsheet. The spreadsheet will become a tool where a user can type a domain name into a cell. If the respective IP address of that domain name is found, then that IP address is shown. If it is not then a "0" appears.

(See the sample spreadsheet in the Lesson Resources folder called "Sample Spreadsheet")


Summative Assessment

A. Describe one rule change for names used on the Internet. Describe the rule before and after the change.

B. Describe one rule change for IP addresses used on the Internet. Describe the rule before and after the change.

C. Describe briefly the process by which the Domain Name System operates.

D. Briefly describe one way the Domain Name System was not designed to be completely secure.

E. Briefly describe one security concern and one coping strategy for the Domain Name System insecurity.

Lesson Summary

Summary

This lesson investigates how search engines work: the spiders that crawl the web in search of valuable information, the data farms that store the data, and the processes used to organize current and historical data. The search process starts before you ever type a query, by crawling and indexing trillions of documents. Students will create a concept map illustrating their understanding of the operations of a search engine. A concept map is an artifact that could be created as part of the Explore Performance Task at the end of Unit 3.

Outcomes

Students will be able to:

  • Describe the processes used by modern search engines to index content on the Internet
  • Arrange the order of operations used in creating an index.
  • Define basic search engine terms: spider, bot, crawl, data farm,
  • Compare category based searching with indexed searching.
  • Use an online tool to create a knowledge diagram of related information.

Overview

  1. Getting Started (5 min) - Think-Pair-Share on Internet Searches
  2. Activities (40 min) - Students cultivate an understanding of searching and build concept maps.
  3. Wrap-Up (5 min) - Share ideas

Source

The slides for the guided exploration of search methods were adapted from slides provided by Marie desJardins at the University of Maryland, Baltimore County.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP4: Model with mathematics.

Key Concepts

Students will understand the many processes that are required for an effective search engine.

Students will create diagrams and concept maps, do some investigations and discuss how search engines work, and then will individually use a computational tool to create an online diagram illustrating their understanding.


Essential Questions

  • How can computing extend traditional forms of human expression and experience?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How can computation be employed to facilitate exploration and discovery when working with data?
  • What considerations and trade-offs arise in the computational manipulation of data?
  • What opportunities do large data sets provide for solving problems and creating knowledge?
  • How are algorithms implemented and executed on computers and computational devices?
  • How are programs developed to help people, organizations or society solve problems?
  • What is the Internet, how is it built, and how does it function?
  • What aspects of the Internet’s design and development have helped it scale and flourish?
  • How does computing enhance human communication, interaction, and cognition?
  • What are some potential beneficial and harmful effects of computing?

Teacher Resources

Student computer usage for this lesson is: required

Lesson Plan

Getting Started (5 min)

Students should journal on the following question:

"How many searches do you think are done each day using the Google search engine?"

Pair and share, then show this amazing live counter of internet searches: http://www.internetlivestats.com/google-search-statistics/ 

Guided Activities (40 min)

Activity 1 (25 min) - Understanding Search

Use the slide presentation "About Search Engines" (in Lesson Resources folder) to direct students through this lesson.

  1. Students create a diagram of their best understanding of what happens when you type a query into a search engine. (Either provide the "Handout: You and the Search Engine Diagram" handout from the Lesson Resources folder or have students write on their own paper.)
  2. Demonstrate how a search engine works with the video (first 2 minutes only) http://www.google.com/intl/en_us/insidesearch/howsearchworks/crawling-indexing.html  and diagram. Students can put a star next to each step in the process they thought of, then add to their diagrams to make them more complete.
  3. Direct students to go to GoogleFight.com. [ for saving time just have the teacher demonstrate] Discuss what happens. Ask:
    • Are all searches completed in the same amount of time?
    • Why or why not?
    • How does Google get the numbers to show on the results?
    • Are the numbers really an indication of the popularity of one thing vs another?
  4. Students work in pairs and use a variety of search engines to find answers to a treasure hunt. The student worksheets are in the resource folder. Lead the discussion with "Socratic questioning." Start with what a URL is (URL = "Uniform Resource Locator" - a unique address of a document or resource on the Internet. http://docs.oracle.com/javase/tutorial/networking/urls/definition.html ). After that, branch out to other questions:
    1. Why are there different search engines?
    2. Why do people get different answers?
    3. Is it better to type in a whole question or just to pick keywords?
    4. What do you do when you don’t get the answer you want the first time you search?
  5. Emphasize how the Intenet is changing. Use the lesson presentation or other resources. 
    1. http://www.hypebot.com/hypebot/2012/07/see-how-much-the-internet-has-changed-the-music-industry-infographic.html 
    2. http://www.digitaltrends.com/computing/cisco-internet-traffic-966-exabytes-per-year-in-2015/ 
  6. Discuss the current state of the Internet, how complicated it is, and why it can’t be indexed completely every day (think size). How is it possible to keep track of such a huge volume of data?

Activity 2 (15 min) - Concept Map Creation

Have students create a concept map of ideas relating to search engines, doing additional research to round out their understanding. (See Teacher Resources for online tools that can be used to create concept maps.)

Wrap Up (5 min)

Share ideas from the students' concept maps. Point out that the concept map (if done online) is an artifact that was created using a computer to present information visually.

Optional Extension: (for fast moving classes who need more to do)

Google tracks everything that everyone queries. (Is this an invasion of your privacy?) The results are fascinating.

Look at www.google.com/trends. You can look at trends by region and limit them to a date and/or place. For example search for “Obama, McCain” limiting your search to 2008, and the United States. What conclusions do you draw? 

Pick another topic of interest to explore in Google trends to reveal society’s interests. 


Options for Differentiated Instruction

Students can create diagrams and concept maps on paper by hand if that is helpful.

Be sure to assign roles to pairs when working together. Don't allow one partner to be passive while the other is active.


Evidence of Learning

Formative Assessment

Students create a concept map of what they learned with additional research on the topic.


Summative Assessment

Students will develop a visual diagram of the processes involved in indexing the Internet by a search engine.

Lesson Summary

Summary

This lesson has two main objectives.

The first focuses on search engine algorithms and the impact search engines have on our lives. Search engine page rank algorithms rely on many factors to predict what someone is looking for. The business advantage of appearing on the front page of a Google search is tremendous. However, as more information is tracked about our interests and preferences in order to customize the results of our searches, we have to ask whether or not the loss of privacy is worth the results.

The second objective is to introduce students to creating a visual artifact (knowledge required for performance tasks). Students will research a page ranking subtopic, prepare a one minute speech, and (if possible) create a video to accompany the speech.

Outcomes

  • A presentation guides the discussion of how search engines work, what page rank is, and how results differ for a variety of reasons.
  • Students then do a quick research project to gather information on assigned, related topics
  • Students create a 1-minute speech and presentation on their chosen research topic. If the classroom has the equipment, they will create a video artifact on their topic to share with the class either in the classroom or as homework posted online 

Overview

Session One

  1. Getting Started (5 min) - Journaling on online search methodology
  2. Activity (45 min) - Students discuss page rank and begin research for presentations

Session Two

  1. Getting Started (5 min) - Journaling on search engine data mining and introduce presentation activity 
  2. Activity (35 min) - Create Presentations/Videos on previously researched topics.
  3. Presentation of videos or talks (10 min)
  4. Optional Homework: Have students watch the rest of the videos made and write about what they learned.

 

Learning Objectives

CSP Objectives

Key Concepts

Students will understand that the page rank algorithm depends on many factors, has changed over time, and has a large impact on the traffic that a site gets.

Students will give examples of how their activity online is tracked and how the knowledge of them is used to taylor the results and the possible repercussions.

Students will create an artifact using screen capture of themselves discussing and analyzing an aspect of searching.


Essential Questions

  • How can computing extend traditional forms of human expression and experience?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • What is the Internet, how is it built, and how does it function?

How can computing extend traditional forms of human expression and enhance people’s ability to find information and solutions?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • "Search Engine Background" NOTE: This document explains the content of each slide in the presentation WITH answers to the questions in the presentation.
  • "PageRank" - slide presentation
  • Handouts for students (can be placed on the student's drives or printed out on paper):
    • "PageRank Student Handout" (optional notes to go along with the PowerPoint - gives students a place to answer questions posed in the presentation)
    • "1 minute talk directions.odt" (to help students organize their video)
    • "Sample 1 minute script on keyword matching"
  • "Sample 1 minute video artifact on keywords.swf" (1:15)

Online Videos:

Sites Used in this Lesson:

 

Lesson Plan

Getting Started (5 min)

Students should take a few minutes to journal on the following question: 

Which are you more likely to do if you don't see an answer to a search request on the first page: click forward to page 2 of the results or ask the question differently? Why?

(Encourage students to discover that it is very valuable to a business to appear at the top of the search engine rankings and that often thousands or millions of results are returned in a single search.)

Activity (45 min)

Part 1 (25 min) - How Search Engines Work

(Use the PageRank presentation in the lesson folder to guide discussion.)

Note: Guidelines for the teacher are in the "Teacher Notes on PageRank Presentation" document. This document also contains an answer key.  (Students can record their notes in the "PageRank Student Handout".)

  1. Watch the three-minute video on Google search closely to pick up details. Pause, take notes, and discuss as needed.
  2. Allow students to generate ideas on why one webpage might have a higher PageRank than the other. [slide 3]
  3. Look at the HTML code of the webpage in the PowerPoint to discover the frequency of keywords including synonyms, and occurrence in titles and metatags. [slide 4] (Student handout also has a printout of the HTML code for students to get a closer look.)
  4. Assign words to students to define. Share definitions with the class. [slide 5]
    • Backlink
    • Referring domain
    • PR Quality
    • SEO
    • Alexa Rank
    • Directory listed
    • Domain age.
    • Whois
  5. Discuss possible reasons why two different people can get different results doing the same search. 

Part 2 (20 min) Preliminary Research for creation of video artifacts/PowerPoints

  1. Assign topics for research to student groups. (There are additional topics in the "Search Engine Background" information document if desired). Here are several suggestions:
    • What are additional factors in page rank?
    • What do people do to achieve SEO? (search engine optimization)
    • What is Google bombing? How does it work?
    • How much storage is needed to store Google’s index? How many server farms are needed to store it all? What is the design philosophy of server farms?
    • What’s the environmental impact of server farms? How do they try to stay green?
    • How does advertising affect search engines? Is it necessary? What is “pay per click” and “click fraud”?
    • How is Google getting good at finding things like pictures, videos and other kinds of information beyond just words?
    • How do directories work? Show some examples, such as https://dir.yahoo.com/ .
  2. If you have video recording equipment: Demonstrate how to create a high-quality video artifact (the kind students might choose to create for their Performance Task).
    • Student handout: 1 minute talk directions -- go over this handout with them.
    • Show the Sample 1 minute video artifact on keyword matching (in the Lesson Resources folder).
  3. With the remaining time, have students begin their research on their chosen topic.

Session 2

Getting Started (5 minutes)

Journal (3 min)

Why could it be beneficial for a search engine to keep track of what people are searching for? In what ways do computers enhance our ability to solve problems? Discuss.

(Possible answer to lead students toward: Topics sporadically become popular, and knowing what results people like can make it easy to suggest sites to others looking for similar things. History data can also enable a search engine to suggest a search phrase when a single word or only a few letters are typed in. The better a search engine knows what you are looking for, the better it can filter results to include results relevant to your query.)

Introduction (2 min)

Explain that students will be creating a presentation on the topic they researched in the last session. This presentation should be scripted, and make use of a PowerPoint and sources from the internet. They will have 30 minutes to make this presentation. (Slide 8 is made for video creation, but works well for general presentations too.)

For classes with enough video recording equipment for all groups:

Explain that students will create their own video explanations of how one feature of search engines works. Go over the "1 minute talk directions.odt" together to help students organize their video. The creative design process to develop such a short, focused product requires good teamwork, organization, and creativity. Plan out what the key message is, what visuals will add the most value, and then craft the wording to fit within the 1 minute time frame. 

Activity (35 minutes)

Students should split into their groups and begin work. Allow only 10 minutes for additional research as needed. They will take the remaining 25 minutes to:

  1. Make a PowerPoint, gather search results to use as examples, create a rough script, and practice their presentation.
  2. If they are making a video: Write a script, either create a PowerPoint to voiceover or choose some search results to analyze, and practice. The last 5-10 minutes should be used to record a 1 minute video clip of their presentation allowing for multiple retakes)

Presentation of videos or talks (10 minutes)

Show as many videos/ group presentations as you can share with the class. If there are videos, assign the remainder to be watched as homework and have students bring in notes on the key points learned from each video.


Options for Differentiated Instruction

For a shorter class, don't have students take notes, just discuss the slides.

For the Explore performance task, each student should be able to create their own artifact. You could have the students work on the presentations individually in this lesson, as a practice for the Explore task, if your class is fairly competent with the technology.  For students with less experience (or to save time during presentations), it could be beneficial to have students create these artifacts in pairs, with some pairs repeating topics for comparison.


Evidence of Learning

Formative Assessment

Students share best definitions of page rank related terms

Students analyze web pages for reasons for differences in page rank


Summative Assessment

Students create a one-minute video clip on a topic related to the operation of search engines.

Lesson Summary

Summary: This lesson is designed for students to review basic statistics, including calculations of the mean, median, mode, and standard deviation. It will also give the students some experience using spreadsheet software to calculate the statistics and to create histograms.  Note: This lesson is intended primarily as a review and a reminder of material that should already be familiar to the students. If your students have little familiarity or experience with using Excel to compute statistics or generate plots, you may wish to extend this lesson to two sessions, and provide more scaffolding and instruction on the basic mechanisms.

Outcomes:

  • Students will review the basic statistical concepts of mean, median, mode, and standard deviation.
  • Students will use spreadsheet software to calculate the statistics and to create histograms.

Overview:

  1. Getting Started (5 min)
  2. Introduction of Content (10 min) - Statistics Introduction and Review
  3. Guided Activity (30 min) - Students Create Plots and Calculate Candy Statistics
  4. Wrap Up (5 min) - Journal

Source: This lesson was adapted from Unit 2: The Engineering Design Process, Lesson 2: Collecting and Processing Information ©2013 International Technology and Engineering Educators Association Foundations of Technology, Third Edition/ Technology, Engineering, and Design

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP5: Use appropriate tools strategically.

Common Core Math:

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

Common Core ELA:

  • RST 12.10 - Read and comprehend science/technical texts

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

The students must understand the basic statistical concepts of mean, median, mode, and standard deviation. They must also be able to use spreadsheet software to calculate the statistics and to create histograms.

Students often have some initial difficulty learning how to use formulas in the spreadsheet software to do the calculations.


Essential Questions

  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How can computation be employed to facilitate exploration and discovery when working with data?

Teacher Resources

Student computer usage for this lesson is: required

For Each Student:

  • Package of colored candy. Alternatively, you can ask students at the end of the previous lesson to collect some distributional data to use for the exercise (ideas: colors of cars in the school parking lot, colors of shirts worn by students in the room, favorite sports teams or bands of the students), or you can simply provide some data for the students to use. This could be either representing colors of candy (using the test data in the lesson if you would like), or similar distributional statistics.
  • Excel software or other spreadsheet software
  • Web resource with information about measures of central tendency: https://statistics.laerd.com/statistical-guides/measures-central-tendency-mean-mode-median.php 

Lesson Plan

Getting Started (5 min)

  • Students should describe what they know about statistics in their journals.
  • Have students share what they know about statistics and introduce the lesson.

Introduction of Content (10 min)

Review of Statistics:

Present a review of basic statistics (min, max, mean, median, mode, and range), and use the following board exercise to have the class review their understanding of these basic concepts:

  • Ask eight or so randomly selected students for their birth date (day of the month).
  • Write these numbers on the board.
  • On the side of the board, list the key terms "min," "max," "mean," "median," "mode," and "range."
  • Ask the class as a group to compute each of these values:
    • Min: The smallest number (what if there is more than one? - no problem!)
    • Max: The largest number (what if there is more than one? - no problem!)
    • Mean: The average (sum of the numbers, divided by how many numbers there are)
    • Median: The center value in a sorted list of numbers.
      1. Have the students help you to rewrite the values from smallest to largest.
      2. Which is the middle number?
      3. Since there are 8 numbers, there is no middle number!
      4. In this case, the median is the mean (average) of the two center numbers = 4th number + 5th number / 2.
    • Range: The difference between the largest and smallest value (max - min).
    • Mode: The most frequently appearing value.  In such a small set, there is likely to not be a mode, unless two students happen to share the same birth date.  You might wish to poll the students for another number (e.g., the students' grade) that's likely to have more repeated values, and then compute the mode (and, optionally, the other statistics).

Discussion:

Ask the class to come up with situations where it might be most useful to compute the mean, median, or mode of a set of values.  Encourage them to understand that each of these statistics can be useful in different situations, but may be misleading.  Have them generate sets of data that would give "misleading values" for mean (if there is an "outlier value"), median (if the values have a longer "tail" on one side than the other), or mode (if there is a frequent value that happens to occur at one end or the other of a wider range).

Guided Activity (30 min) - Candy Statistics

Note: The teacher may want to do this activity along with the students, displaying the spreadsheet on a screen so that the students may ask questions and see how to do the statistical calculations using the spreadsheet software. Students who do not have much experience with spreadsheets may need more scaffolding and instruction. (If you have many such students, you may wish to spread this lesson out over two class sessions.)

Students will use spreadsheet software, such as Excel, to calculate the average number and standard deviation of candy color in an individual-sized bag of M&Ms, Skittles, or other colored candy. Optionally, students may compare their results to other online published statistics for each candy.

  1. Have the students predict how many individual candy pieces are in their bag of candy and write their predictions in their journals.
  2. Have the students open their bag of candy and sort the candy into categories based on color.
  3. Have the students note the difference in the total number of candies predicted versus the actual number that was in the packet. They should note the difference in their journals.
  4. Open an Excel program and create a spreadsheet like the following. Each Trial Number in the example below corresponds to a student or group in the class.  (Note: If you do not have candy to do the counting exercise, you may simply give the sample spreadsheet below to the students.)

Candy Statistics

Trial Number

1

2

3

4

5

6

Yellow

17

20

24

19

19

17

Red

21

13

19

21

15

18

Blue

10

18

16

18

21

20

Brown

7

12

5

12

12

14

Green

26

26

16

17

22

18

Orange

24

16

20

15

15

16

Package Total

105

105

100

102

104

103

 

The students will also need to create columns further to the right labeled Mean, Median, Mode, and Standard Deviation.

Mean

Median

Mode

Standard Deviation

19.375

19

19

2.199837656

18.125

19

19

2.799872446

17

17.5

18

3.338091842

9.5

10

12

3.380617019

21.125

22

22

3.833592124

18.25

17.5

16

3.284161124

 

  1. Each student will enter their own data for each color and the data from another student or group into the table.
  2. Using their data, students will:
    1. Calculate the mean value for each color category within the experiment. They should use the Average function to do the calculation.
    2. Calculate the median, mode, and standard deviation for all color categories. They should use the appropriate functions to do the calculations.
    3. Calculate the package total for each trial by using the SUM function.
    4. Create a ± 3ϭ histogram for each candy color.
    5. Create a frequency distribution table for each candy color, as illustrated below.
    6. Create a histogram for each candy color, using your bin and frequency data.

Yellow Candy σ =

2.199837656

Get on

3Cs

25.97451297

2S

23.77467531

1s

21.57483766

Mean

19.375

-1s

17.17516234

-2s

14.97532469

-3s

12.77548703

Wrap Up (5 min)

Students will answer the following question in their journals:

  • Why is it important to use statistics to understand large data sets? When are different measures of central tendency appropriate or inappropriate?

 

 


Options for Differentiated Instruction

Learners may be paired to assist each other in the use of the spreadsheet software.


Evidence of Learning

Formative Assessment

The teacher should frequently check the students' work for accuracy as the lesson progresses so that misunderstandings may be quickly resolved.


Summative Assessment

  • Have the students calculate the mean, median, mode and standard deviation of a set of data.
  • Have the students use a spreadsheet to do statistical calculations and create a histogram.

Lesson Summary

Summary

This lesson provides the students with an opportunity to practice the AP CSP Explore Performance Task with a given set of tasks from which they may choose. Students will use a rubric to perform self-assessment of work generated for the Explore Performance Task.

Outcomes

  • Students will practice the AP CSP Explore Performance Task.
  • Students will use a rubric to grade the paper created in the previous class to evaluate their own work and make modifications where necessary.

Overview

Session 1

  1. Getting Started (5 min)
  2. Introduction of Content (10 min) Introduce the practice Explore Task and review the rubric.
  3. Independent Activity (30 min) Write responses to questions posed on "Practice Explore Task Response Document" research and summarize results with a focus on using few words to convey a significant message.
  4. Wrap Up (5 min)

Session 2

  1. Getting Started (5 min)
  2. Independent Activity (40 min) Work on artifacts (original digital artifact screencast or a knowledge map diagram) to express the effects of your chosen innovation.  
  3. Wrap Up (5 min)

Session 3

  1. Getting Started (5 min)
  2. Independent Activity (40 min) Collect written responses, continue to work on artifacts. Share exemplary features with the class as time allows.
  3. Wrap Up (5 min)

Source: The lesson models the College Board AP CSP Explore Performance Task.

Learning Objectives

CSP Objectives

Common Core ELA:

  • RST 12.1 - Cite specific textual evidence to support analysis of science and technical texts, attending to important distinctions the author makes and to any gaps or inconsistencies in the account.
  • RST 12.6 - Analyze the author's purpose in providing an explanation, describing a procedure
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 7. Engaging in argument from evidence

NGSS Content:

  • HS-ETS1-3. Evaluate a solution to a complex real-world problem based on prioritized criteria and trade-offs that account for a range of constraints, including cost, safety, reliability, and aesthetics as well as possible social, cultural, and environmental impacts.

Key Concepts

The students will be able to use reliable research findings to generate a computational artifact and respond to questions on that innovation. 


Essential Questions

  • How can a creative development process affect the creation of computational artifacts?
  • How can computing and the use of computational tools foster creative expression?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • What considerations and trade-offs arise in the computational manipulation of data?
  • What aspects of the Internet’s design and development have helped it scale and flourish?
  • How does computing enhance human communication, interaction, and cognition?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: required

In the Lesson Resources folder:

  • "Explore_Performance_Task_Rubric_Nov2015" : AP test rubric for the overall practice performance
  • "Practice Explore Task Job Completion Check List" : check list for task jobs
  • "Practice Explore Task Response Document November2015" : response document
  • "CSMattersWritingRubric.docx" : detailed formative assessment writing-specific rubric for the practice Explore performance task

Lesson Plan

Session 1:

Getting Started (5 min)

  • Previous evening's homework was to complete the Practice Explore Performance Task worksheet. 
  • Group students by topic in groups of 3 – 4.  Have students share findings with each other and report any missing items.  Teacher will need to circulate to assist where needed.

Introduction of Content (10 min)

Instruct the students that they are to use their findings to generate a computational artifact and a one-page paper on an innovation. 

Directions for artifact:

The artifact is an original digital artifact screencast or knowledge map diagram that you create to express the effects of your chosen innovation.  

Directions for the Paper:

Students are to generate a written document in which they respond directly to the following prompts.  Their document should be a one-page paper that may include illustrations. 

  • Describe the area of our lives (social, economic, or cultural) that has been most impacted by the innovation, and discuss the significance of the innovation to this area, using references to support your argument.
  • Describe the population that is affected by the innovation and explain why that population is significant.
  • Describe the connection between your artifact and the innovation you explored.
  • Identify and describe how information sharing has affected this innovation.
  • Discuss the extent to which this innovation is dependent on the Internet.
  • Describe any security concerns and explain how they relate to the innovation.
  • Describe the beneficial as well as any harmful effects of the innovation you explored.

Independent Activity (30 min)

Writing responses to questions posed on "Practice Explore Task Response Document" and creating artifact.

Remind students that brevity is important for the performance tasks; it is a talent to be able to get a message across with real content succinctly.

I have made this letter longer than usual, only because I have not had time to make it shorter. ~Blaise Pascal (1623-1662).

Wrap Up (5 min)

Have students complete the "Practice Explore Task Job Completion" form, indicating where they are in the process of the Practice Artifact. 

Homework

Complete any additional research needed to complete the document (if needed).

Session 2:

Getting Started (5 min)

The previous evening's homework was to complete the paper that students were working on in the previous class.  Pass out the rubric and have students go through their paper to verify that they have all points covered.  Point out that most of the points awarded are based on the report (75% of the total score) and the artifact represents 25% of the score.  Teacher will need to circulate to assist where needed.

Independent Activity (40 min)

  • Students are to make any modifications necessary on their paper and work on the artifact.  The entire project will be collected next class.
  • The artifact is an original digital artifact screencast or a knowledge map diagram that you create to express the effects of your chosen innovation.  

Wrap Up (5 min)

Have students complete a Job Progress form indicating where they are in the process of the Practice Artifact. 

Homework 

Complete the paper using the rubric as a guide.  Complete the plan for the artifact; you will have one more class period to work on the artifact before the project is due.

Session 3:

Getting Started (5 min)

The previous evening's homework was to complete responses to "Practice Explore Task Response Document" modifications as indicated using the rubric that students received in the previous class.  Using the artifact part of the rubric, have students go through their plans for the artifact to verify that they have all points covered.  Point out that most of the points awarded are based on the report (75% of the total score) and the artifact represents 25% of the score.  Teacher will need to circulate to assist where needed.

Independent Activity (40 min)

The responses to "Practice Explore Task Response Document" for the Practice Explore Performance Task should be complete.  Students should be focused on the artifact.  The entire project will be collected next class.

Wrap Up (5 min)

Have students complete a Job Progress form indicating where they are in the process of the Practice Artifact. 

Homework

Complete artifact using the rubric as a guide.  The Practice Explore Performance Task is due at the start of the next period.


Options for Differentiated Instruction

SPED/LLD:  need to be frequently monitored and assisted as needed.

Teachers may choose to spread this activity out into multiple class sessions over a longer period of time, to give students some more time to work on the paper and artifacts at home (especially if the class meets every day, since "overnight homework" is often difficult for students to complete effectively when they are involved in other after-school activities and have assignments for other classes).


Evidence of Learning

Formative Assessment

Practice Explore Performance Task -- provide feedback, using College Board's rubric (Explore_Performance_Task_Rubric_Nov2015.pdf and the CSM detailed Explore Task writing rubric (CSMattersWritingRubric.docx and CSMattersWritingRubric.pdf) -- both can be found in the lesson folder


Summative Assessment

Explore Performance Task

Lesson Summary

Pre-lesson Preparation

This lesson does not require computers, but teaching this lesson without computers would require printing the necessary articles and providing textbooks or printed articles about the various cyber-attacks.

Summary

Reflecting on the fact that the Internet was not designed with security in mind, students will examine the devastating impact of cyber attacks. Students will study types of cyber attacks and the vulnerabilities they exploit, and identify the roles of software, hardware, people, and the Internet. Students will identify potential cybersecurity concerns in systems built on the Internet. 

Outcomes

  • Students will understand types of security violations.
  • Students will understand types of protections.
  • Students will compare negative impacts of different types of attacks.

Overview

  1. Getting Started (5 min) - Discussing the internet's security concerns.
  2. Guided Activities (40 min) - Students explore and research specific cybersecurity attacks and their impacts.
  3. Wrap Up (5 min) - Journaling on the accessibility of student data.
  4. Homework - Research anti-virus software.

Learning Objectives

CSP Objectives

Common Core Math:

  • S-IC.1-2: Understand and evaluate random processes underlying statistical experiments

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.9 - Synthesize information from a range of sources
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.1 - Write arguments on discipline specific content

Key Concepts

6.3 Cybersecurity is an important concern for the Internet and the systems built on it.

The Internet was not built with security in mind, leaving computers vulnerable to cyber attacks. This makes cybersecurity an extremely important concern when designing and implementing systems that are built on the Internet. Students need to be able to identify potential problems that could arise and potential options for protecting against these problems.


Essential Questions

  • How is cybersecurity impacting the ever increasing number of Internet users?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: optional

In the Lesson Resources folder:

  • "Cyber Security" : slides for instruction during the whole class
  • "Cyber Attacks News Articles" : the list of news articles about real life cyber attacks for teachers (with instructions)
    • The diagram for the sticky note activity is in this document
  • "Cyber Attacks Notes WS" : worksheet for students to use in taking notes on different types of attacks
  • Consider including the TED talk about the first virus (about 17 minutes long) by Mikko Hyponnen https://www.ted.com/talks/mikko_hypponen_fighting_viruses_defending_the_net 

 

Journal Sample Response: 

  • "The Internet was originally designed to be used by a group of people who trusted each other. This means that it was not built with security in mind, but rather openness and sharing. Now that anybody can access the Internet, users cannot trust everybody else they are connected to. This means that security measures must be put in place to protect users and systems."

Example for Presentations:

Information to present about firewalls. (Included in the slides)

“You can protect against certain attacks. One way to protect against them is a firewall.” 

  1. Where did the name come from?
    1. We have physical firewalls in school (and other buildings) that are designed to open to let people in and out, but close to keep fire contained (don’t let it through)
  2. How does it work? Describe the process, making sure to note the role of each of the following: (not all will necessarily apply)
    1. A firewall is installed to be a barrier between a computer (or local network) and the Internet. A person has to purchase / install the firewall to protect their system. Firewalls can be software or hardware and sometimes people use both. Firewalls examine the packets attempting to go in or out from the computer (or local network) to/from the Internet. It can keep attacks like viruses out, and keep sensitive or private data in.
  3. Visual from https://mdilog.com/help/security

Lesson Plan

(Note: There is a PowerPoint to be used with this entire lesson: "Cyber Security Lesson Slides" in the Lesson Resources folder.)

Getting Started (5 min) 

In their journals or as a class, students should discuss the following:

  1. Describe the “trust model” that the Internet was originally designed upon. 
    • The "trust model" was introduced in Lessons 3-4, 3-5, and 3-6 that introduced the Internet.
  2. List the problems with using the trust model, now that anybody can access the Internet.
  3. Define cyber crime and cyber warfare. How are they different from everyday crime and warfare?
    (cyber crime: https://us.norton.com/cybercrime-definition ; cyber warfare: http://time.com/3928086/these-5-facts-explain-the-threat-of-cyber-warfare/ )

Guided Activities (40 min)

Part 1 (20 min) - Readings 

  1. Each student will read a short article from the news about a specific attack that took place and identify the type of attack. Through their readings, the students will identify the negative effects of the attack. (A list of possible articles is in the "Cyber Attacks News Articles" document in the lesson folder.)
  2. Students will use sticky notes to record the following information (at least one per student):
    1. The student's name
    2. The type of cyber attack
    3. The impact of the cyber attack
  3. On the board, the teacher will set up a space with the types of attacks on the y-axis, and the level of impact on the x-axis (see teacher resources). Students will place the sticky notes on the diagram where they think it fits.
  4. Students will be asked what information and knowledge they can draw from the diagram.
  5. The teacher will model the next activity for the students by presenting some information on firewalls. This includes explaining where the name "firewall" comes from, how a firewall works, the roles of software, hardware, people, and the Internet, and a visual representation.

Part 2 (20 min) - Small Group Activity

  1. Students will be grouped by the type of attack they read about. They will conduct research to answer the following questions: (some resources will be provided, but students can also search for others. If no computers are provided, it will be up to the teacher to find these additional resources)
    1. Where did the name come from?
    2. How does the attack work? Describe the process, making sure to note the role of each of the following: (not all will necessarily apply)
      1. The Internet
      2. Software
      3. Hardware
      4. People
    3. Find or create a visual that illustrates the attack OR act out the process.
  2. Each group (or at least some, depending on time) will present their findings to the class in 2 minutes or less.
    1. Students should use the "CyberSecurity Notes WS" document to take notes for use in studying for the Unit 3 assessment.

Wrap Up (5 min)

Students will consider the following prompt, and record their thoughts in their journals:

What possible problems are there with the fact that student data (including your courses, grades, attendance, home address, and birthdate) is stored in a database that is easily accessible to teacher, administrators, and other staff from any computer connected to the Internet?

  • What security concerns does this raise?
  • What can be done to protect student data?

Homework: 

Real World Connection: Protecting your Computer

Choose one of the following articles to read, based on the operating system you have running on one of your home computers, or the computer you normally use.

Answer the following questions:

  1. Does the computer have anti-virus software installed?

If yes, answer the following questions:

  1. What is the name of the anti-virus software installed on the computer?
  2. Is the anti-virus software on the computer up to date?
  3. What features does the anti-virus software provide?

If no, do the following:

  1. Find at least two different anti-virus programs for your operating system (one that is free and one that you must purchase).
  2. Compare and contrast the anti-virus programs based on the features that they offer.
  3. Talk to your parent about installing anti-virus software on your computer if you own one.
  4. Does the computer have a firewall enabled?
  5. Is the operating system up to date? Which version of the operating system is the computer currently running?
  6. What other security measures have been taken to protect the computer?

Optional: Use this extended checklist to enhance the security of your computer.

http://m.wikihow.com/Secure-Your-PC


Evidence of Learning

Formative Assessment

The teacher will see where the students place the cyber attacks as they read about them on the impact graph and give appropriate feedback.

The teacher will monitor the research on cyber attacks and check for accurate information.

The teacher will clarify misconceptions that become evident during the group presentations.


Summative Assessment

Students will complete a journal entry by responding to questions about their personal and school related data being accessible through the Internet. 

 

Lesson Summary

Summary

Students are introduced to the topic of cryptography and learn to perform two encryption techniques. The students will identify the role of the algorithm and key in the encryption process. Students will use abstraction to see the general process used in symmetric encryption. The students will consider the strength of ciphers and the importance of keeping the key a secret. 

Outcomes

  • Students will understand how encryption is used to keep data secure.
  • Students will learn how encrypting and decrypting data is accomplished using an algorithm and a key.
  • Students will understand why the key must be kept a secret.

Overview

  1. Getting Started (5 min) - Journal
  2. Introduction to Content (15 min)
    1. Lesson Motivation [5 min]
    2. Presenting the Key Concepts [10 min]
  3. Guided Activities (25 min)
    1. Practice [15 min]
    2. Follow Up: Analyzing the Strength of Ciphers [5 min]
    3. Follow Up: Defining Symmetric Encryption and Seeing the Abstraction in Symmetric Encryption Systems [5 min]
  4. Wrap Up (5 min) - Journal

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core ELA:

  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

  • Encryption is used to keep data secure as it is transmitted through the Internet.
  • Symmetric encryption involves encrypting and decrypting data using an algorithm and a key.
  • Encryption algorithms themselves are standardized (well known), so the key must be kept secret.

Essential Questions

  • How is cybersecurity impacting the ever increasing number of Internet users?

Teacher Resources

Student computer usage for this lesson is: optional

In the Lesson Resources folder:

  • "Cryptography Partner Practice": A worksheet for the students
  • "Cipher Python Project": A worksheet with instructions for a simple Python project
  • "Cipher Python Project Rubric": The rubric for the Cipher project

Optional: Lesson slides with the key questions, encryption demos, and diagrams (the teacher could simply read the questions and present demos and diagrams by writing on a board).

For examples, consider reviewing The Code Book by Simon Singh.

Lesson Plan

Getting Started (5 min)

Journal:

  • Name one website you use that requires you to log in with a username and password.
  • Why does the website require you to provide a username and password?

Introduction to Content (15 min)

Lesson Motivation  [5 min]

  • Present the scenario: “Alice would like to send a message to her friend Li in China, but she wants to keep it secret from everybody else.”
  • Ask the students: “If Alice sends the message to Li by email over the Internet, will her message remain secret?”
  • Student responses should bring up the architecture and trust model of the Internet to show that Alice’s message could be intercepted along the way, since it will pass through many devices before it ends up at Li’s computer.

Present the Key Concepts [10 min]

Tell the students, “This problem is not a new one. Throughout history, people, including government and military officials and personnel, business owners, and others, have wanted to send secret messages to someone but worried that the message could be intercepted along the way.”

There are two ways to try to keep the message secret: Steganography and Cryptography.

Explain the basic difference between the two. 

  • Steganography is when a message is "hiding in plain sight". Examples: Writing something in invisible ink that can be revealed with a special type of light. 
  • Cryptography is when a message is modified in a way that hides the meaning of the message. For example, the letters are replaced with symbols that someone else would not understand.

Present two different encryption techniques, showing one example of each.

An alternative to this lecture portion above is to have students independently study the same concepts using a reading, video, or online learning tool. Here are some suggested resources:

Summarize with this overview: "Each encryption scheme involves an algorithm and a key. The algorithm is the set of steps that you follow to accomplish the encryption. The key is the secret piece of information that is needed to know exactly how to apply the algorithm in this case. This allows you to securely send encoded information across the Internet and decode it when it arrives. Some codes are more secure than others."

Guided Activities (25 min)

Practice [15 min]

Have the students pair up and practice sending each other encrypted messages, then decrypting them to make sure they end up with the correct message. 

A worksheet called "Cryptography Partner Practice" is provided in the Lesson Resources folder.

  1. Each student gets to write two short messages that they will encrypt and send to their partner.
  2. First message: Transposition: Use the rail fence algorithm. You must agree on the number of rails to use (this will be the “key”).
  3. Second message: Substitution: Use the shift substitution cipher algorithm. You must agree on the amount to shift (this will be the “key”).
  4. For each message, pass it to your partner and have them decrypt it using the agreed upon algorithm and key. Have them read back the decrypted message to make sure they decrypted it correctly.

Follow Up: Analyzing the Strength of Ciphers [5 min]

Ask the students: “How difficult would it be to crack a message that was encrypted using the Caesar (shift) cipher if you didn’t know the key? How would you do it?” (Easy, try each of the 25 possible shifts.)

Present: There are two ways to increase the strength of encryption:

Option #1: Increase the number of possible keys.

A general substitution (not limiting to just a shift) dramatically increases the number of keys. The number of keys in this case is the number of permutations (different orderings) of the 26 letters in the alphabet. This can be computed by multiplying the 26 options for the first letter in the cipheralphabet, by the 25 remaining options for the 2nd letter, 24 remaining options for the 3rd letter, etc. (26! or 26 factorial).

The answer: 4.032914e x 1026 keys (Google will calculate it for you).

This analysis makes it seem as though a substitution cipher would be unbreakable, but clever people have invented tricks (e.g., frequency analysis) that can be used so you don't have to try all of the different keys.

Option #2: Use a better algorithm. 

For example, use a polyalphabetic cipher that combines multiple cipher alphabets.

(If time allows, you can have students explore other ciphers. For further study, see Khan Academy or The Code Book by Simon Singh.)

Follow Up: Defining Symmetric Encryption and Seeing the Abstraction in Symmetric Encryption Systems [5 min]

Present a diagram that shows high-level view of the encryption and decryption process (see The Code Book, p. 11).

  1. Identify this as an example of abstraction. (You can ask the students to try to explain why.) Example: This is abstraction because it shows the general process of encryption and decryption using any key or algorithm. It omits the details of the specific algorithm and the type of key.
  2. Tell the students, “The types of encryption you learned today are called “symmetric”. Why do you think they are called “symmetric”?  (The same key is used to encrypt and decrypt. You use the algorithm to encrypt, and then reverse it to decrypt.)
  3. What do you think it would mean for encryption to be asymmetric (non-symmetric)? (foreshadowing the next lesson)

Wrap Up (5 min)

Journal:

  • What is the role of the algorithm in the encryption process? What is the role of the key?
  • Which one of these, the algorithm or the key, is more important to keep secret? Why?

Optional Project for additional Python Practice

Use the "Cipher Python Project" worksheet in the Lesson Resources folder. Students are tasked to create a simple Caesar cipher program that uses ASCII values to shift messages by a certain letter. The rubric for this project is also in the Lesson Resources folder.

Homework (Optional): Choose one of the following or let each student choose which one to complete.

  1. Computer Encryption: Use bitwise XOR to do substitution cipher (see The Code Book, p. 247)
  2. Students read a historical account that involves encryption (Mary, Queen of Scots) http://www.nationalarchives.gov.uk/spies/ciphers/mary/ (After reading the introduction, click on the links below the picture for “Mary’s ciphers” and “The Babington Plot”)
  3. Students read about cryptanalysis and learn about the frequency analysis technique. Try using it on an encryption puzzle..
    1. An example of breaking a substitution cipher: http://www-math.ucdenver.edu/~wcherowi/courses/m5410/exsubcip.html
    2. Try deciphering an encrypted message using the techniques you read about: http://cryptogram.org/solve_cipher.html#contents

 


Evidence of Learning

Formative Assessment

The teacher will evaluate student responses to the journal entries, class discussion questions, and the students performance during the encryption practice.


Lesson Summary

Summary

In this lesson, students will learn two solutions to the key distribution problem and the mathematical foundations behind these solutions. They will make connections between encryption, the use of SSL/TLS in web browsers, and the use of digital certificates. Students will recognize the value of open standards used in modern cryptography.

Outcomes

  • Students will understand the impact of the key distribution problem on secure communication.
  • Students will understand that a carefully designed one-way mathematical function allows people to exchange keys or use public keys to solve the key distribution problem.
  • Students will understand that digital certificates are used for authentication, and that these certificates rely on the trust model: the certificate authorities are being trusted to provide accurate information.

Overview

Session 1

  1. Getting Started (5 min) - Students journal on the safety of transactions made online and the role of cryptography,
  2. Introduction to Content (15 min) - The Key Distribution problem and mathematical modulus are presented and discussed.
  3. Guided Activities (25 min) - Students learn about double encryption through analogies and a group activity.
  4. Wrap Up (5 min) - Journaling on sharing secrets.

Session 2

  1. Getting Started (5 min) - Students journal on how Diffie's solution benefits them.
  2. Introduction to Content (5 min) - Students discuss Diffie's solution to the Key Distribution problem
  3. Guided Activities (35 min) - Students Role Play and Journal about Public Key Encryption.
  4. Wrap Up (5 min) - Journaling about the positive/negative aspects of Public Key Encryption

Learning Objectives

CSP Objectives

Essential Questions

  • How are programs developed to help people, organizations or society solve problems?
  • How is cybersecurity impacting the ever increasing number of Internet users?

Teacher Resources

Student computer usage for this lesson is: optional

In the Lesson Resources folder:

  • Lesson slides
  • Worksheet for Key Exchange Activity
  • Script for Public Key Encryption 3 Act Play

Lesson Plan

Session 1

Getting Started (5 min)

Students should answer the following questions in their journals:

  • What types of online activities require information to be kept secret when it is transmitted?
  • How does cryptography allow for information to be kept secret when it is transmitted?

Introduction to Content (15 min)

Suggested Review

  • Have students present their solutions to the "Computer Encryption" homework from Lesson 2-12 and/or connect back to the previous lesson by posing the question: "Do you think computers actually use the encryption algorithms we learned last class?"
    • This discussion should lead to the question of what algorithms computers actually use. In the 1970s, the US government chose DES as the standard encryption algorithm that everybody could use. It has been updated to AES, which is a stronger algorithm, but DES and AES are very similar. 
    • The teacher should make the point that at a high level, DES/AES are symmetric encryption algorithms that work on the same basic principle of the simple algorithms we looked at in the previous lesson.
    • The teacher can leave it at that, or optionally present some brief details on DES/AES. One option is to show the first minute or two of this visualization video and talk over it: http://youtu.be/mlzxpkdXP58

Motivation: Present the Key Distribution Problem:

Introduce the following topic. Allow for discussion among the class about possible solutions to the problem presented. 

  • Alice wants to send Li some secret information over the Internet. We know that she can encrypt the information before sending it, but how will Li know what key Alice used to encrypt the message?
  • This is called the Key Distribution Problem and it has been around as long as encryption has. A whole business was developed around this challenge: people were paid to go around the world delivering briefcases full of encryption keys. This distribution process obviously can be very expensive and is completely unpractical for the average person. For a long time, nobody thought that the key distribution problem could be solved algorithmically.

After the class has come up with some ideas, reveal a solution to the problem that was found using math.

Present Key Information: Dreamers to the Rescue – Two men, two solutions, one important mathematical idea.

  • Despite everybody telling them they were crazy and hopeless, Martin Hellman and Whitfield Diffie teamed up to try to solve the Key Distribution Problem. Amazingly, they each came up with a solution, both of which can be used to solve the problem.
  • Introduce One-Way Functions: Both solutions use a mathematical concept called “one-way functions”.  Most functions we are familiar with are “two-way": that is, they can easily be applied in either a forward or a reverse direction. For example, if f(x) = 2x, then it is easy to see that f(5) would be 2(5) or 10. It is also easy to see that if f(x) = 10, then 2x = 10, so x must be 5. One-way functions are different in that they are easy to use in one direction, but are very hard to reverse.
  • Key Distribution – Solution #1 – Hellman’s Idea – Key Exchange Protocol

Guided Activities (25 min)

Analogy (10 min)

  1. To help with the explanation of the topic, start with an analogy that uses different colors of paint.
  2. The real system relies on a mathematical operation called modulus (or clock arithmetic), which is when you divide two numbers and find the remainder.
    • Use a clock to visually demonstrate the operation. (The number mod 12 gives you the time)
    • Show how to do modulus by using either long division, a calculator, or Google. (Consider this: If you know the number you divided by, and you know the remainder, can you easily figure out what the original number was? )
    • Alternatively, show the next section of the video: https://www.youtube.com/watch?v=YEBfamv-_do  [4:20 - 6:18]

The system also uses powers (base/exponent). Very briefly review power notation.

Group Activity (15 min)

  1. Students are paired up, and then join another pair to form a group of four.
  2. Using either a set of clear directions or an online widget, one pair performs the key exchange using the Yx(mod P) expression, while the other pair listens in.  They then switch roles. They should see that the key is established while sharing information publicly, but the key itself is kept secret.

Wrap Up (5 min)

Students should answer this question in their journals:

  • How can two people establish a shared secret in public?

Suggested Homework:

Research Hellman and Diffie’s work on public-key exchange, identify the big ideas of CS Principles that show up, and provide specific examples of how they are related to what you find out about Hellman and Diffie's work.  Alternately, read about the British group that developed the same solution as Hellman and Diffie's to public key encryption in secrecy (http://cryptome.org/ukpk-alt.htm).

Session 2

Getting Started (5 min)

Students will read the following question and record their thoughts in their journals:

  • Whitfield Diffie said that he wanted to solve the key distribution problem for benefit of "ordinary people," as opposed to just governments and corporations. How do you and I benefit from his team's solutions to the Key Distribution Problem?

Have students present ideas from their journal entries. Use this as a way to review the Key Distribution Problem, and the team that tackled the problem.

Introduction to Content (5 min)

Present Diffie’s Solution - Public Key Cryptography

  • The Idea: Encrypt with one key (public key), decrypt with a second key (private key)
  • For further clarification, use this analogy:
    • Analogy with Physical Locks – Person B gives out open padlocks (public key) to anybody who wants to send him or her something secret. Person A just puts the secret in a box, and shuts the padlock (easy to do!). When Person B receives the box, they use the combination (private key) to unlock it.
  • This is called “Asymmetric Encryption” since it uses two different keys.
  • Consider what happens when you go to a "secure" website to check out when you are finished shopping at an online store. Your browser says "https" and some show a picture of a lock. The system, called SSL (Secure Sockets Layer) or the updated version TLS (Transport Layer Security) takes advantage of Diffie's system.

Guided Activities (35 min)

Part 1 (20 min) - Role Play

Have students act out three short scenes (see "Public Key Encryption Plays") in order to illustrate how the system works. (It is advisable to select "dramatic" students to fill the four roles.)

Roles

  • Customer
  • Store
  • Store Impersonator 
  • Certificate Authority

Overview

  • Act 1: The customer and store use public key encryption to complete an online purchase using a credit card. (All seems well, but the next act will have a twist!)
  • Act 2: The store impersonator distracts the store and jumps in, steals the credit card info. (After this, stop for a minute and ask the students to explain what the problem is)
  • Act 3: Repeat Act 2, except that now the customer asks the Certificate Authority to verify the public key. The impersonator is revealed as a fraud, then the real store completes the transaction with the CA verifying.

Follow Up question to ask the students: Who do you have to trust for this system to work? (2 min)

  • Sample Answer: The Certificate Authority. You are trusting that they are giving you valid information so you can verify the identity of others. (A student may ask how you know the certificate authority is not being impersonated. The answer is that the public key of the certificate authority is saved in your browser so you can verify their identify yourself. )

Optional Section on Mathematical Foundation

What are the mathematical details that enable this idea of work? (Don't worry, we are not going to fully answer this!)

  • Diffie didn’t actually figure out the math to make this actually work, he just had the key idea (Example of Abstraction!) He put the idea out there for others to figure out the details of the math that would make it work (Example of Collaboration!)
  • One system (RSA) multiplies prime numbers as part of the one way function. It is easy to multiply two prime numbers, but it is very hard to determine the factors of the product (if you didn't already know them).
    • Give the students a couple of problems to illustrate this.
    • The two primes that you multiply are essentially the "private key". The product is the "public key".
    • This works in practice because the numbers used are huge, making the factoring process extremely difficult and time consuming, even with a large amount of computational power.

Discussion: Do “Open Standards” make sense in the world of Cryptography?

The systems of encryption used on the web have been "standardized" (meaning that everyone agrees to use the same systems) so that computers all over the world can communicate with each other. These standardized systems could be "proprietary" (meaning the details are kept secret), or they can be "open" (meaning the details are shared for anybody to see).

Part 2 (15 min) - Think-Pair-Share

Students will Think-Pair-Share about the following prompts:

  • If cryptography is all about secrecy, then does it make sense to have open standards of encryption? List all the pros and cons that you can think of for open standards.
  • Open standards fuel the growth of the Internet. Why? (consider both hardware and software)

Possible responses

Benefits of open encryption

  • People can independently verify that the algorithm is strong, secure, and doesn’t have vulnerabilities.
  • People can make sure there are no “back doors” in the algorithm that let certain people spy on them even without the key.

Benefits of open standards

- The bigger picture: Open Internet standards are the cornerstone of the Internet’s success. They enable its existence, facilitate its growth, and provide a platform that supports creativity, as well as social and economic opportunity for its billions of users. Open standards are implemented around the world in all kinds of Internet products and services. https://www.internetsociety.org/policybriefs/openstandards 

Note: Heartbleed vulnerability is a good example of something that was eventually caught because of open standards. (This could be a homework assignment to read about it)

Drawbacks

  • Any cyber-criminal can look at the algorithm and try to find a vulnerability to exploit.
  • People may assume that because it is open, all the vulnerabilities have been found and plugged when that is not necessarily true.

Wrap Up (5 min)

Students should read this question and record their thoughts in their journals:

  •  "Open standards result in strong security". Do you agree or disagree with this statement? Give specific reasons to back up your position.

Optional Homework:

Read about Heartbleed vulnerability in SSL. Reflect on how open standards relate to this.

Extensions:  

RSA Encryption Algorithm Video: http://youtu.be/M7kEpw1tn50


Evidence of Learning

Formative Assessment

The teacher will observe and evaluate student responses to journal entries, class discussion questions, and class activities.


Lesson Summary

Summary

This lesson will increase student awareness of the concept that there are dangers associated with Internet usage. It addresses Internet Security with issues inherent to Internet usage: viruses, worms, Trojan horses, and identity theft. The primary objective of this lesson is to equip students with knowledge that will enable them to make responsible choices regarding their Internet use, to prevent security risks.

Outcomes

  • Students will be able to identify key general attributes of the threats to the security of computers and information via the Internet such as viruses, worms, and Trojan Horses.
  • Students will understand critical attributes of the sources, and consequences to individuals and society, of identity theft.
  • Students will understand how to protect themselves and their computers from external threats.
  • Students will develop a strategy to inform others of the security risks inherent to Internet usage.

Overview

Session 1

  1. Getting Started (10 min) - Introduce vocabulary and discuss Internet security.
  2. Guided Activity (35 min) - Students explore malicious code, identity theft and its effects
  3. Wrap Up (5 min) - Journaling about problems associated with the Internet.

 

Learning Objectives

CSP Objectives

Key Concepts

Students will:

  • Learn about the different types of malicious code and how to take prevention steps to safeguard systems, data, and identity.

  • Give advice on secure cyber practices.

Essential Questions

  • How is cybersecurity impacting the ever increasing number of Internet users?
  • What are some potential beneficial and harmful effects of computing?
  • What are different types of malicious code and what is the intention of each attack?
  • How can internet users protect themselves from malicious code and prevent such cybercrime attacks?
  • How can internet users follow secure practices to reduce the risk of identity theft?

 

Teacher Resources

Student computer usage for this lesson is: required

Teacher's resources:

  • NA SAIT Security Video - Malicious Code - Malware Video - https://www.youtube.com/watch?v=7wAHZLFiY-E
  • What to do if you are a victim of Identity Theft: Possible Answers
    • The FTC’s website is a one-stop resource to both learn about identity theft and walk you through the appropriate actions if your identity is stolen: http://www.ftc.gov/bcp/edu/microsites/idtheft/
    • Some possible steps if your identity is stolen:
      • Report the identity theft to the three major credit bureaus: Experian, TransUnion, and Equifax.
      • File a police report with local law enforcement.
      • Report the theft to the FTC online at www.ftc.gov/idtheft or by phoning 1-877-ID-THEFT (1-877-438-4338).
    • Possible ways for Deterring Identity Theft:
      • Shred financial documents that are not being kept for safeguarding. [This allows a teacher to cover the kind of information that should be held and for how long (in years). It also allows a teacher to cover what documents are best kept in a safe deposit box, a home safe, regular home files, etc.]
      • Do not carry around your Social Security card in your wallet.
      • Do not give out personal information over the phone or over the Internet unless you are absolutely sure who you are dealing with.
      • Choose computer and electronic passwords with care by avoiding birth dates, your Social Security number, your mother’s last name, etc.
      • Try not to have your postal mail pile up in your mailbox for several days; if you are going to be away for a few days, have your mail held at the post office until you return.
      • Do not click on suspicious links in e-mail or complete forms with your account number and password. Check the web address.
      • Be suspicious about regular bills that do not arrive on time, denials of credit for no apparent reason, calls or letters about purchases you did not make, charges on your financial statements that you do not recognize.
      • Use a password to access your mobile devices such as your cell phone, tablet (iPad), etc., just as you would have a password to get access to your e-mail accounts.

Students' resources:

  • writing journals
  • blogs

Lesson Plan

Session 1

Getting Started (10 min)

  1. Journal: How might malicious code be a threat to Internet security?
    • Possible answers to bring up: identity theft, data theft, stealing money, breaking down other computers, turning other computers into bots to create more problems, etc.
  2. Introduce the topic/Discussion: Inform the students that today they will be talking about Internet security and participating in discussions about the dangers of viruses and , identity theft and malware along with resources and prevention tips.
    • Malicious code is programming code designed with a harmful intent (to hack, cause damage, etc.). With Internet usage comes rights and responsibilities to protect your computer from malicious code. Malicious code causes millions of dollars in damage every year.
    • How can malicious code spread across many computers so quickly?
    • Examine the idea of interconnectedness.
    • Look together at the Digital Attack Map which displays global DDoS activity on any given day. Attacks are displayed as dotted lines, scaled to size, and placed according to the source and destination countries of the attack traffic when known. Have students react to the histogram at the bottom of the map to explore historical data and select a country to view DDoS activity to or from that country at http://www.digitalattackmap.com/understanding-ddos/ .
  3. Introduce key vocabulary - have students crowdsource definitions or look up separately and compare.
    • Computer virus
    • Spyware
    • Ransomware
    • Bot
    • Hacker
    • Malware
    • Adware

Guided Activity (30 min) - Malicious Code and Identity Theft

  1. Play the NA SAIT Security Video: "Malicious Code - Malware" at https://www.youtube.com/watch?v=7wAHZLFiY-E ( 3 minutes, from 2013)
    • AnnMarie Keim, IT Specialist, discuss the concepts of Internet Security and introduce the different types of malicious code and how to protect from this type of cybercrime. Keep your system updated, use antivirus and firewall. Backup important files.
  2. Review the following words from previous lessons:
    • routers
    • firewalls
  3. Discuss: Is malcious code the only way to cause harm on the Internet? (no) 
    • https://vimeo.com/63422786 (0:30) Google mini-video to show what phishing is, using a brick through a glass window example to get attention.
    • Talk about social hacking, using ordinary everyday life tricks to get information like looking over somebody’s shoulder when they type their password, sneaking inside of a locked door before it closes, etc. Point out that it is a combination of people, software and hardware that are both the problem and the solution to Internet security.
  4. Students work in groups to explore selected topics. See the document in the lesson folder: Lesson 13 Cybersecurity: Malicious Code, Identity Theft Additional resources for possible resources. Or search and look for a reliable provider of information. Students create a blog post about their topic to share at the end of class.
    • Suggested topics: (decribe how they work and what can be done to protect against them in terms of human behavior, software and hardware)
      1. Famous viruses,
      2. Virus Hoaxes
      3. Worms
      4. Trojan Horses
      5. identity theft
      6. Phishing scams
      7. Cellphone and texting scams
      8. Ransomware
      9. Firewalls
      10. Antivirus and anti-malware protection

 

Wrap Up (5 min)

Students will read the following prompt and respond in their journals:

  • The only 100% way to prevent malicious code attacks and identity theft is to not go on the Internet. Do you see that as a viable solution for individuals? Corporations? Support your answer.

Consider the following questions and discuss answers as a class:

  1. Have you or someone you’ve known experienced a virus, or malware? What was the outcome? What did you take away from this experience?
    • Cover the following:
      • Time and Money spent – (by corporations and by individual to protect computer)
      • What were the consequences?
      • What did the victim go through?
  2. How can you avoid malicious code? 
    • Possible Answers:
      • Anti-virus software
      • Anti-spyware software
      • Anti-adware software
      • Restore points
      • Keep patches and updates current on your computer
      • Careful use of email
      • Careful use when downloading items

Homework (optional)

On your home computer, see how vulnerable you are to malware and identity theft:

  • Carry out some remedies and prevention tips (minimum of three tasks) that you learned today.
  • On your blog, list what you did to safeguard your system, your data, and your identity.
  • Be prepared to share in the next class

Options for Differentiated Instruction

Extensions/Differentiation:

If there is additional time, watch one of the TED talks

  • James Lyne: Everyday cybercrime -- and what you can do about it (17:26)
  • The Internet is on fire | Mikko Hypponen | TEDxBrussels (19:16)

Students can create an "Identity Theft Prevention Action Plan," including a purpose and list of ten guidelines, to share with family and friends after they have researched prevention tips on the FTC website.

  • Students may use their choice of the following Web 2.0 websites to create their action plan:
  • Students will embed their action plan to a blog post in order to share with teacher, classmates, friends, and family. Students should email friends and family (minimum of three people with the teacher cc'd) the link to this blog post on Identity Theft Prevention Action Plan (title of blog post and subject line of email).

Evidence of Learning

Formative Assessment

  • Journal writings
    • Introduction question prompts
    • Wrap-up question prompt

  • Class discussions - answers, input, and further inquiry by students

  • Identity theft prevention plan

Summative Assessment

Unit Assessment and Investigate/Explore Performance Project – at end of unit.

Lesson Summary

Data is stored and transmitted online efficiently using many different kinds of hardware and software to send it quickly and accurately. Data can be compressed to take up less storage room and transmission time and, at the core, the entire system is made up of simple circuits that work with binary information that flows at an incredible speed all around the world.

This flexible lesson offers the teacher the opportunity to reteach key concepts such as binary, abstraction, Internet functionality and also teachers the layers of hardware abstraction from transistors and logic gates up to computing devices.

Journal (5 min)

Review Presentation on Binary and the Internet (20 min) optional

Activity 1: Data compression (10 min)

Activity 2: Presentation on Logic gates and hardware abstractions (20 min)

Wrap Up (5 min)

Assessment can be in class or can be used as homework. (20 min) optional

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core Math:

  • N-Q.1-3: Reason quantitatively and use units to solve problems
  • A-CED.1-4: Create equations that describe numbers or relationships

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure

NGSS Practices:

  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking

NGSS Content:

  • HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering.

Teacher Resources

Student computer usage for this lesson is: required

The Computer Science Field Guide http://csfieldguide.org.nz 

Coding and compression: http://csfieldguide.org.nz/en/chapters/coding-compression.html

Data representation: http://csfieldguide.org.nz/en/chapters/data-representation.html 

Use the binary number calculator to check conversion calculations

How computer memory works (5:05) http://ed.ted.com/lessons/how-computer-memory-works-kanawat-senanan

Presentations: Unit3Lesson14_InternetData_Presentation, Unit3Lesson14LogicGates_Presentation.

Worksheets: Accompanying student notes to be filled in. Unit3Lesson14_InternetData_StudentHandout, Unit3Lesson14LogicGates_Handout. Also Unit3Lesson14_InternetData_ReviewSection

Lesson Plan

 Journal (5 min)

How does information get from one computing device to another using the Internet? (also on Slide 1 of the Unit3 Lesson14_InternetData_Presentation)

Slides 2-3 review the basic steps to sending information online: 

  • Information is encoded in binary, then, (check to see if students remember how to do decimal to binary conversions)
  • divided up into packets and sent
  • decoded into words, pictures, etc when it arrives.

This is a review of unit 3. Pair, share and discuss. Identify weak areas of student understanding.

Review Presentation on Binary and the Internet ( 20 min)  - optional

If students need additional review: provide the handout: Unit3Lesson14_InternetData_ReviewSection (to accompany slides 4-9) and continue with the presentation, otherwise use the handout as an assessment.

  • SLIDE 4: Fill in the blanks using words on the handout to describe the important features of internet communication.
  • SLIDE 5: define protocol and ISP
  • SLIDE 6: each device has an IP address that is looked up using the DNS
  • SLIDE 7: packets are routed, paths are redundant
  • SLIDE 8: review binary codes and number conversion
  • SLIDE 9: answers to binary questions from SLIDE 8

Activity 1: Data compression (10 min)

Distribute Unit3Lesson14internetData_StudentHandout (slides 10-11) on data compression and abstractions from low level to high level with notes to accompany the video how computer memory works (5:05)

  • SLIDE 10: compression saves time and storage. Look up lossy and lossless compressions (Lossless compression reduces the number of bits used and trasmitted, which can be reconstructed to the original data without any approximation; Lossy compression significantly reduces the number of bits at the cost of accurately reconstructing the original data)
  • SLIDE 11: abstractions from low level to high level
  • SLIDE 12: different file formats have characteristics for their intended uses and different media have advantages and disadvantages for their intended use (cost, stability, peformance, size, etc)

 

Activity 2: Presentation on Logic gates and hardware abstractions (20 min)

Present Unit3Lesson14_LogicGates_Presentation about hardware abstraction.pptx

Distribute Student handout: Unit3Lesson14LogicGatesHandout.docx

  1. Prompt: Ask what really goes on inside of computers.
  2. Computers are fast and accurate. To show how quickly they can do caclulations, demonstrate google search engine’s ability to instantly provide the answer to complicated calculations like 271839 to the 23rd power
  3. All data is in binary so all calculations must be in binary
  4. Inside each chip are circuits.
  5. If you could see inside a chip you’d see the communication lines for the bits, like roadways, and the processing units like buildings
  6. Abstractions: the CPU is made of circuits, circuits are made of logic gates.
  7. Follow bits through a calculation. The number 7 is pressed on the keyboard sending 00000111 to the CPU to be processed
  8. The algorithm for addition is invoked when the “+” sign is pressed and will start up when the 2nd number is entered.
  9. 21 is pressed followed by = and the addition algorithm starts with the rightmost bits and adds up each column
  10. addition is done with logic circuits. Logic circuits are made up of logic gates. There are picture symbols for each gate
  11. looking at the AND gate, how many different input values can A have? How many different output values can Q have?
  12. Use a truth table to show the inputs and outputs of a logic gate
  13. The not gate, or inverter, changes a signal to its opposite
  14. There are logic gates in an addition circuit
  15. How logic gates add 2 digits
  16. How logic gates add 3 digits
  17. How the OR gate works
  18. The deeper you look into what is happening the better you can understand what is really going on inside of a computing device.
  19. Diagram of layers of abstraction from transistors up to computing devices.
  20. Sample lotic questions
  21. Sample AP ® type question
  22. Career connections in circuit design

 Wrap Up (5 min)

Assessment (20 min) optional or can be used as homework.

 Also available Logic Gates additional practice handout and informational article.


Options for Differentiated Instruction

More than any other lesson so far, this lesson should be customized to meet the needs of the students. If they have a background in electronics and logic circuits from science or STEM classes, or have a firm grasp of binary number conversion and how the internet works, these sections of the lesson can serve as a very quick review skipping past the slides with extra detail.

For advanced students: Use the Unit3Lesson14 assessment and the Unit 3 Lesson 14 Data on the Internet - Review Section as summative assessments after a brief review.

For students who do not have this background knowledge, use the presentations and notes.


Evidence of Learning

Formative Assessment

Notes and exercises for binary encoding, data compression, logic circuits, how the internet works and layers of hardware abstraction.


Summative Assessment

Unit 3 Lesson 14 Summative Assessment

and 

Unit 3 Lesson 14 Data on the Internet - Review Section

can be used as a formative or summative assessment.

Lesson Summary

Summary

In the Explore Performance Task (EPT), students choose and explore a computing innovation.  The EPT requires students to select and investigate a computational innovation that:
●    Has or has had the potential to have significant beneficial and harmful effects on our society, economy, or culture.
●    Consumes, produces, and/or transforms data.
●    Raises at least one data storage concern, data privacy concern, or data security concern.

Students are expected to complete the EPT with minimal assistance from anyone.  Students will have 8 hours of class time to complete, and submit:
●    Computational Artifact
●    Written Responses

Computational Artifact

  • Submit a video, audio, or PDF file.
  • Acceptable multimedia file types include .mp3, .mp4, .wmv, .avi, .mov, .wav, .aif, or .pdf format.
  • PDFs must not exceed 3 pages in length.
  • Video or audio files must not exceed 1 minute in length and must not exceed 30MB in size.

Written Responses

  • Submit one PDF document responding to each of the prompts and clearly label your responses 2a – 2e in order.
  • Response to all prompts combined must not exceed 700 words. The references required in 2e are not included in the final word count.

Suggested Schedule October 2017


This schedule provides a schedule for 10 50-minute sessions, in order to meet the 8-hour in-class minimum required by the College Board.

 

Sessions 1 and 2  Using Development Processes and Tools

  1. Identify and select a computing innovation (CI).  Confirm the innovation is a CI
  2. Research and identify the CI purpose, function or effect.
  3. Design a Computational Artifact (CA) that represents or explains the purpose, function or effect.
  4. Construct the CA.
  5. Write written response 2A and 2B (include in-text citation)

 

Sessions 3 -5  Analyzing Impact of Computing

Research:

Find an additional fact about the purpose or function of the CI

Find at least one effect of the CI

Find a group that benefits from an effect.

Find a group that is harmed by the effect.

 

  1. Identify a fact about the intended purpose or function of the CI.
  2. Identify at least one effect of the intended use (not purpose or function) of the CI.
  3. Identify an effect as beneficial and as harmful or Identify one effect as beneficial and identify another as harmful. Effect must be a result of the intended use of the CI.
  4. Relates an effect to a group in society, economy or culture.
  5. Write written response 2C (include in text citation)

 

Sessions 6 - 8  Analyzing Data and Information

 

Research:

Find the concepts the CI manages and the data it uses to manage it

Find how the data is consumed, transformed or produced

Find a data security, data privacy or data storage concern of the data the CI uses

Find a group that is harmed by the effect.

  1. Identify the data the CI uses and how it is consumed, produced, or transformed.
  2. Identify one data security, data privacy or data security concern and relate it to the CI.
  3. Write written response 2D (include in text citation)

Finding and Evaluating Information - References and Submitting Documents

 

Sessions 9 and 10

  1. Write written response to 2E. Create a bibliography of all work used that was produced by others and verify in text citations.
  2. Submit Computational Artifact and Written Responses

 

 



Overview


Session 1: Identify performance task requirements and choose a computing innovation

Session 2: Review EPT Rubric and Research - Day 1

Session 3: Draft Written Responses part 2A, 2C, and 2E

Session 4: Research - Day 2

Session 5: Artifact Design

Session 6: Artifact Development

Session 7: Artifact Development

Session 8: Written Responses to parts 2B, 2D, and 2E

Session 9: Complete Artifact and Written Responses and Create PDF versions

Session 10: Submit Artifact and Written Responses

Learning Objectives

CSP Objectives

Key Concepts

Students will be able to identify beneficial and harmful effects of a computing innovation.

Students will be able to explain how the innovation uses, produces, and/or transforms data.

Students will be able to explain a privacy, security, or data storage concern related to the innovation.


Teacher Resources

Student computer usage for this lesson is: required

AP Computer Science Principles Explore Performance Task  -- Explore_Performance_Task_Nov2015.pdf in lesson resources folder

AP Computer Science Principles Performance Task Rubric -- Explore_Performance_Task_Rubric_Nov2015.pdf in lesson resources folder

Lesson Plan

Teacher Guidelines

Prior to Administration of the Performance Task

Teachers should have instructed students in each of the following before this lesson.

  • How to obtain reliable sources to support facts
  • Use of organizational and prewriting tools
  • Use of computational tools needed for creation of computational artifacts
  • Proper citations of references
  • How to distinguish between effective and ineffective artifacts
    • Samples may be used
    • Effective artifacts help the reader/viewer understand the beneficial and harmful impacts of the innovation
    • Ineffective artifacts repeat information in the written responses, are multi-slide presentation with paragraphs or bullets, are not original - copy and paste - or emphasize the functionality of the innovation rather than its impact
  • How to distinguish computing innovations from other innovations

Teachers and classmates may help students to understand the Explore Performance Task, help students manage the process, and help them to submit the required projects. Once the work on the project begins, however, students must work individually without assistance.

At the beginning this Explore Performance Task Lesson:

Teachers should influence student selection of a computing innovation (see Exploring Computing Technologies in the Explore_Performance_Task_Nov2015 in lesson folder).  However, teachers may not require selection of particular topics for students.

Direct students to find a computing innovation and its:

  • Beneficial and harmful impacts on society, economy, and culture
  • Use, production, and/or transformation of data
  • Relationship to a concern about data storage, privacy, or concern

Guide student understanding of the products that they must produce, including:

  • The nature of each product
  • The level of detail required
  • The time that students have to complete and submit the projects

During the Performance Task

Teachers should:

  • Resolve hardware/technical problems.
  • Manage student progress throughout the task. 

Teachers may:

  • Perform summative assessment; however, may not provide any feedback.
  • Clarify directions for the performance tasks.
  • Remind students of submission requirements.

Teachers may not:

  • Provide or distribute the topics that students have chosen to other students.
  • Write, revise, or amend student work.
  • Perform research for students.
  • Provide boilerplates.
  • Allow students to submit practice tasks as actual performance tasks.
  • Suggest or evaluate student products until after the computational artifact and written responses are submitted.

Overview

Session 1 develops student understanding of the EPT requirements and guides selection of a computing innovation to explore. If this was done in the practice task, then questions addressed in this session may be assigned as homework, with students using the first day to do preliminary research.

Session 2 develops student understanding of the rubric, so they know the level of expectations that readers will have when scoring them.  If this was done during the practice EPT, then the questions assigned in the section may be assigned as homework and the full day used for student research.

Session 1: Identify performance task requirements and choose a computing innovation.

Introduce the Explore Performance Task (EPT)

Tell students:

Today you will begin the Explore Performance Task.  It is an exploration of a computing innovation of your choice according to the guidelines established by the College Board.  The goal of this task is to deepen your understanding of computer science principles.

Exercise 1: 

Provide students with a copy of the Explore Performance Task (Explore_Performance_Task_Nov2015 in lesson folder) description from the College Board.  Students should read the Overview section on page 1 and answer the three questions below, sharing their answers with elbow partners. (2 min)

  1. Who chooses the computing innovation you will explore?
  2. What two products are you to produce?
  3. How much time will you have to complete and submit the required products?

After students share with elbow partners, address any questions students have to this point. (3 min)

Students should read the General Requirements section beginning on page 1 and answer the seven questions below sharing their results with elbow partners. (10 min)

  1. What three aspects of the computing innovation will you investigate?
  2. What are three types of references that you may use for the project?
  3. How many sources are you required to use?
  4. How many of the sources must either be in print or online?
  5. How many of the sources must have been created since the end of the previous academic year?
  6. What must the computing artifact that you produce represent or explain?
  7. What do your written responses need to address?

 After students share with elbow partners, address any questions that students have to this point. (5 min)

Students should read just the first two paragraphs of the Submission Requirements section on page 2 and answer the four questions below sharing their results with elbow partners. (3 min)

  1. What must your computational artifact explain or illustrate?
  2. What must the computational artifact not do?
  3. What is the computational artifact's maximum size?
  4. Your written response is a document with five sections to be labeled 2a - 2e in order.  What is the total number of words that your written response may contain?

After students share with elbow partners, address any questions students have to this point. (2 min)

Assign students to 5 groups and assign a section a - e to each group.  Have each group answer these two questions for each section (10 min)

  1. What topics are to be addressed in section 2a?
  2. What is the suggested length (number of words) for this section?
  3. What topics are to be addressed in section 2b?
  4. What is the suggested length (number of words) for this section and how detailed should it be?
  5. What topics are to be addressed in section 2c?
  6. What is the suggested length (number of words) for this section?
  7. What topics are to be addressed in section 2d?
  8. What is the suggested length (number of words) for this section?
  9. What is to be included in section 2e?
  10. How are the items in this section to be cited in the written response? 

After completing the four exercises, students are to choose a computing innovation to explore and share their choice with you. (15 min)

Before the next lesson, students must select and submit to you the name of the computing innovation.

Session 2: Research day 1

Tell students:

Today will be your first research day.  Before starting your research, we will examine the rubric that readers will use when scoring your computational artifact and written response.

Provide students with a copy of the Explore Performance Task Rubric (Explore_Performance_Task_Rubric_Nov2015.pdf in the lesson folder). Jigsaw the rubric. Assign students into five groups and assign one row of the rubric to each group.  Students are to prepare a 60-second response to these three questions about their row of the rubric. (2 min)

  1. What is the content area?
  2. How does a medium-quality response or artifact differ from a poor one?
  3. How does a top-rated response or artifact differ from a medium one?

Each student group shares their insights based on these three questions. (5 min)  Students put any questions that they have about the rubric on a post it note and put the question on the board.

Students must work individually from this point until the projects are ready to be submitted.

Students research their computing innovation, especially addressing the first two components of written response 2A and written response 2C, while collecting references to be included as a part of written response 2E.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 3: Draft Written Responses to part 2A, 2C and 2E

Tell students:

Today, students are to plan and draft responses to the first two parts of written response 2A and written response 2C, and begin creating reference section 2E. Students should include citations for information in parts 2A and 2C.

Respond to each of the student's questions posted on the board. You may clarify student understanding of project requirements and expectations.

After drafting these responses, students continue researching the computing innovation.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 4: Research Day 2

Tell students:

Students are to continue research into their computing innovation focusing on written response 2D while collecting references to be included as part of written response 2E.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 5: Artifact Design

Tell students:

Today, you will begin the second portion of the EPT by planning your Computational Artifact.

Students reread the Explore Task Submission Requirement item 1 and answer the following 2 questions.  ( 2 min )

  1. Which of the following will your computational artifact address about your selected computing innovation?
    1. intended purpose
    2. its function
    3. its effect
  2. What will your computational artifact illustrate or explain beyond what is in your written responses so far?

Plan to accomplish the goals you specified in your answers to question 1 and 2.

  • Describe the artifact that you will produce.
  • List the computing tools that you will use.
  • List the computing techniques that you will use.
  • Layout the artifact that you will create

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 6: Artifact Development

Tell students:

This is the first of two days scheduled for students to create their computational artifacts.  Start today by planning what you need to get done each of the two days and how much will be done on this first day.

After planning the two days of artifact development, students complete today's portion.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 7: Artifact Development

Tell students:

This is the second of two days scheduled for students to create their computational artifacts.  After this session the next two sessions are intended for students to complete both written responses and the computational artifact.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 8: Complete Written Responses to parts 2B, 2D and 2E.

Tell students:

This is the first of two days scheduled for students to complete the EPT.  This session is scheduled to focus on the written response. As time permits students may work on their computational artifact.

Students complete their written response.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 9: Complete Artifact or Written Responses and Create PDF versions

Tell students:

This session is for students to complete constructing the two required documents of the EPT and save them in an appropriate format.  

Reread and revise each Written Response including an inspection of references, associated citations and total word limits. Save the written response in PDF format.

If students are submitting their computational artifact as a PDF, it may not exceed 3 pages.  The College Board also accepts multimedia files containing the computational artifact.  Acceptable formats are mp3, mp4, wmv, avi, mov, wav or aif.  If students elect to create multimedia files, the files may not be longer than 1 minute nor larger than 30MB in size.

At the end of class, students complete a daily progress report. Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content.

Session 10: Submit Computational Artifact and Written Response

Tell students:

There are three goals for this session.

  • Submit all EPT documents by uploading them to the performance task submission web site.
  • Present all computational innovations to the class.
  • Complete a post task reflection.

Students upload both files. (15 min)

Computational Artifact Presentations

Post Task Reflection

What did you learn about the computing innovation you explored?

What advice would you give to students in next year's class?  


Options for Differentiated Instruction

  


Evidence of Learning

Formative Assessment

Daily planning and progress reports


Summative Assessment

Students may not recieve feedback on the content of the EPT until after it has been submitted.  Once they are submitted to the College Board EPT can be assesed using the EPT rubric.

Lesson Summary

Summary

In this lesson, students will learn how to acquire and analyze data to find answers to questions and solutions to problems. Students will consider whether or not the data they are presented with is necessarily valid, and research some of the various data sources online.

Outcome

  • Students will explore how computation can be employed to help people process data and information to gain insight and knowledge.
  • Students will learn how computation can be used to facilitate exploration and discovery when working with data.
  • Students will consider what considerations and trade-offs arise in the computational manipulation of data.
  • Students will explore opportunities that large data sets provide for solving problems and creating knowledge.

Overview

Session 1

  1. Getting Started (5 min) - Students journal on the importance of validating data
  2. Discuss journal prompt (5 min)
  3. Brainstorm types of online data (5 min)
  4. Explore how meaning is created from data (10 min)
  5. Work with data online (20 min)
  6. Assign homework (5 min)

Session 2

  1. Getting Started (5 min) - Students journal about what they learned the previous day
  2. Analyzing Data (30 min) - Discuss correlation and causation; discuss and explore different types of data and analysis
  3. Present homework findings (10 min)
  4. Wrap Up - Journal (5 min)

Learning Objectives

CSP Objectives

Key Concepts

Students will be able to acquire data and analyze it to find answers to a specific question or solutions for a specific problem.


Essential Questions

  • What opportunities do large data sets provide for solving problems and creating knowledge?

Teacher Resources

Student computer usage for this lesson is: required

Student computer usage for second lesson is: optional

Teacher Resources

In the Lesson Resources Folder

  • PowerPoints: "Finding Data" and "Finding and Analyzing Data" 
  • Session 1 Homework: "Homework Unit 4 Lesson 1"

Webpages Session 1

Webpages Session 2

Lesson Plan

Session 1

For this session, use the presentation "Finding Data" in the Lesson Resources Folder.

Getting Started (5 min)

Given this data: [slide 1]

A blood drive at the local high school reveals that 20% of the students were HIV positive.

Journal on these questions:

  • What is your immediate reaction?
  • What questions do you have?

Activities (40 minutes)

Activity 1 (5 min) - Discuss the journal prompt

Lead the students in discussion using the bullets below and slide 2 of the PowerPoint as guidence. Students should talk about WHY they assumed the data was true, or were uncomfortable questioning the truth of the data. 

Activity 2 (5 min) - Brainstorm: What kinds of data can be found online?

Part 1 - Discussion

Data comes from many places and takes many forms [slide 3]

  • Have students discuss: How do business, personal, government and devices create and use data?

Part 2 - Brainstorm

Brainstorm as a class: what kinds of data are generated? Possible answers:

  • video: movies, webcam images, CCTV, youTube, Netflix, Facebook, etc.
  • pictures: maps, Instagram, photos, cartoons, drawings, …. everything!
  • words: books, articles, news, stories, blogs, Facebook
  • numbers: facts, financial transactions, scientific data
  • sound: music, speech
  • behavior tracking: GPS, click behavior, search history

Activity 3: How is meaning created from data? (10 minutes)

  1. Look at some data gathered about selfies from different cities around the world. [slide 4]  
    • Main ideas:
      • You have to gather the data and analyze it to create meaning. 
      • Creating meaning from pictures still takes some human interpretation.
    • Prompt students to come to a conclusion about the graphed data on the page.
    • Question for discussion: How large of a sample is needed to draw a conclusion?
  2. Quick review: Make the point that there is a LOT of data even in a single picture. [slide 5]
    1. Define these and put them in order. Use this webpage to review bytes: http://highscalability.com/blog/2012/9/11/how-big-is-a-petabyte-exabyte-zettabyte-or-a-yottabyte.html
      • MB, bit, TB, ZB, byte, GB, pixel (one dot of color on the screen), KB, PB
    2. Look at the photo on slide 5.
      1. 365 gigapixels is 365 billion pixels, if the picture is a square, then it is 604,152 pixels on each side (too big to fit on any HDTV screen) 
      2. http://www.rtings.com/info/what-is-the-resolution  A 4K super high resolution TV is only about 3,000 X 2,000 pixels. Even a movie screen can’t show all of the detail!
      3. https://www.amctheatres.com/sony4k, you can only look at it one part at a time.
    3. Preview Wolfram Alpha, an engine for providing knowledge from data.

Activity 4 (20 min) - Work with some data online

  1. Students should complete the Data Search and Analysis Handout. [slide 7]
    • Depending on how much time you have, you can pair students and assign even/odd questions or chunks of questions to different groups, or have each student research on their own.
  2. If there’s time in class, try to go over results and compare (especially the first 5) to see if people got similar answers. Why or why not? [slide 8]

Assign Homework (5 minutes)

Give students the worksheet: Homework Unit 4 Lesson 1.

There are 10 videos to choose from, each 10-15 minutes long. Either allow students to self-select, or assign them a particular video. Students should watch the video and answer the questions on the worksheet. This is an opportunity to discuss plagiarism: students are expected to watch the video and write from their own experience.

Session 2

For this session, use the presentation: Finding and Analyzing Data from the Lesson Resources Folder

Getting Started (5 min)

Students should journal on the following:  Describe at least 2 ways that we create meaning out of data. [slide 1]

  • Possible answers: graph it, total it, average it, find min and max, map it, compare it to other data, find trends, generate predictions (like weather), draw conclusions (facial recognition, emotions, voice inflection), diagnose diseases, discover new stars, etc.

Activities (40 min)

Activity 1 (35 min): Analyzing Data

Part 1: Correlation vs. Causation

  1. Look at slide 2 from the PowerPoint. Creating meaning from data can be misleading.
  2. Point out that the graph shows a direct relationships between the number of divorces in Maine and the amount of margarine that is purchased. When one goes up, the other does too, and vice versa. Is this a causal relationship?
    • Show some examples from the Tyler Vigen website http://www.tylervigen.com/spurious-correlations . It has many examples of data connections that may be statistically valid but don’t make sense.  The site was created to point out how comparisons due to data correlation are often not valid. 

Part 2: Data Science

    1. What does a data scientist do? [slide 3]
      • Show the two videos and discuss.
      • Tricks to analyzing big data:
        • Knowing what data to use, and what to disregard.
        • Knowing how to make up for missing data.
        • Knowing how to discover and predict trends and correlations.
      • There are many degrees offered in data science, and free online courses are available from Udacity and Coursera, among others.
    2. Look at 3 false assumptions about big data [slide 4]:
      1. It’s complete and accurate
      2. It tells the whole story
      3. Bigger is better
    3. What considerations and tradeoffs arise in the computational manipulation of data? [slide 4]
      1. How do you account for missing data?
      2. How do you certify your sources?
      3. How do you decide which data to include and which to exclude?
      4. How much data is enough? (time is money!)
      5. Are your processing algorithms accurate?
    4. What is some of the data needed to successfully fly a space mission? (Possible answer: Knowing all about the spacecraft: speed, direction, amount of fuel/oxygen left.) The same problems that applied to early space missions are some of the same problems faced in dealing with big data.
      • You need to decide which factors to include in your calculations, and which to exclude.
      • You need to decide when to make an assumption for missing data or when to estimate.
      • In writing a program for an early space flight there are many unknown factors using a space craft that has never flown before.
      • It’s usually impossible to create a perfect algorithm that can take into account every possibility, so how do you allow for errors and changes?
    5. What are some of the calculations needed? (Possible answers: how much fuel to release and with which engines.)
      • They had to run many simulations first to see what would happen under various circumstances.
    6. See if anybody knows how NetFlix, movie makers, or Amazon use data about their customers to be more successful. [slide 5] http://www.smartdatacollective.com/bernardmarr/312146/big-data-how-netflix-uses-it-drive-business-success and http://www.fastcompany.com/3024655/pitch-perfect-and-how-analytics-are-transforming-movie-marketing

Businesses like Amazon and NetFlix learn the habits of different customers and make recommendations based on their previous choices and others who share similar characteristics (like Google ads).

See if anybody knows the story of Moneyball (based on a true story) of how a baseball team made decisions based on data analysis to become winners, https://en.wikipedia.org/wiki/Moneyball_(film) and how Vivek Ranadivé--who knew little about basketball but owned a multi-million dollar computer processing company and knew how to choose and analyze data--coached his then twelve-year-old daughter’s National Junior Championship basketball team to the national championship game.  He relied upon his sporting knowledge of soccer and cricket paired with his analytic mindset, to create a system of play which allowed his relatively un-athletic team to excel.  From the moment that he used intellect and his business experience to coach an inexperienced team to the championship game, the man who once thought basketball was “mindless” was hooked on the sport. http://www.newyorker.com/magazine/2009/05/11/how-david-beats-goliath

  1. How is data analyzed? Data analysis requires an algorithm, a plan to collect and process data. [slide 6]
    1. Generate discussion about what data is collected and how it is analyzed. What is a possible algorithm for making a decision about choosing what movies NetFlix might suggest for a customer?
    2. http://www.smartdatacollective.com/bernardmarr/312146/big-data-how-netflix-uses-it-drive-business-success
      Brainstorm: what other data might they collect? (what’s currently popular in that age group, demographic, etc.)
  2. Choose one of the options and write an outline of an algorithm: choosing a movie to produce or a sports player to hire. [slide 7]
    1. Describe at least two calculations needed
    2. Describe some of the data you’d need to collect.
    Share and discuss.

Activity 2 (5 min): Present homework from previous day after watching TED talks on data. [slide 8]

If time is short, choose only 1 or 2 of the questions from the homework to be presented to the class and collect the rest to grade.

Journal (5 min)

In your writing journal, map out the steps to answer a specific question or find a solution to solve a specific problem using data. 


Options for Differentiated Instruction

Extension Activities:

Data analysis activities from NOAA, NASA, and more! - http://climate-expeditions.org/educators/activities.html

Differentiation Instruction:

What is data acquisition? - http://www.ni.com/data-acquisition/what-is/

Data analysis and graphs (with Excel sample) - http://www.sciencebuddies.org/science-fair-projects/project_data_analysis.shtml

Collecting and analyzing data - http://ctb.ku.edu/en/table-of-contents/evaluate/evaluate-community-interventions/collect-analyze-data/main

Using Excel for Handling, Graphing, and Analyzing Scientific Data: A Resource for Science and Mathematics Students - http://academic.pgcc.edu/psc/Excel_booklet.pdf

 

 

 

 


Evidence of Learning

Formative Assessment

Journal day 1: 

Given this fictitious data:

A blood drive at the local high school reveals that 20% of the students were HIV positive.

  • What is your immediate reaction?
  • What questions do you have?

Journal day 2:  Describe at least 2 ways that we create meaning out of data.

Homework: Feedback from a TED video on big data

 


Summative Assessment

Students complete the Data Search and Analysis student activity.

Write an outline of an algorithm to make a data-based decision about what movie to produce or what sports team member to hire.

Lesson Summary

Summary

Students will define and identify models and simulations. They will work in groups to propose a simulation that could be used to investigate a hypothesis.

Outcomes

  • Students will identify real-world examples of models and simulations.
  • Students will understand that models and simulations are used to generate new knowledge, as well as to formulate, refine, and test hypotheses.
  • Students will understand that simulations allow hypotheses to be tested without the constraints of the real world.

Overview

  1. Getting Started (5 min)
  2. Introduction to Content (10 min)
  3. Guided Activities (30 min)
    1. Define and Identify Models and Simulations [10 min]
    2. Use Models and Simulations to Answer Questions [20 min]
  4. Wrap Up (5 min)

Source

Some of the ideas in this lesson were adapted from the CS10K community site, https://sites.google.com/site/mobilecsp/lesson-plans/realworldmodels

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP4: Model with mathematics.

Common Core ELA:

  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text

NGSS Practices:

  • 2. Developing and using models

Key Concepts

  • Models and simulations are used to generate new knowledge, as well as to formulate, refine, and test hypotheses.
  • Simulations allow hypotheses to be tested without the constraints of the real world.

Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?

Teacher Resources

Student computer usage for this lesson is: optional

These videos supplement the material covered in this lesson:

 

Lesson Plan

Getting Started (5 min)  

 

  • Journal: If I flip a coin 10 times, is it possible to predict exactly how many times it will come up heads? Why or why not?
  • A weather forecaster presented a forecast with a 20% chance of precipitation the next day.  The next day it rained.  Explain how the forecast may still have been correct.

 

Introduction to Content (10 min)

Introduce Vocabulary

Choose one of the simulations at Phet simulations and answer the following.

 

  • What models are being used?
  • What details are included?
  • What details are omitted?
  • What does the simulation seem to show?

 

View these two videos

Bill Nye and a scaled model of the solar system (4:17)

https://www.youtube.com/watch?v=97Ob0xR0Ut8

Computer Generated Model of a Solar System (2:41)

https://www.youtube.com/watch?v=8z5mwAlxBYc

Guided Activities (30 min)

Students create a journal entry responding to these two questions:

What was a main idea presented by each video?

What aspect(s) of the models helped make that point?

Students discuss each of the following with elbow partners then groups.

How do the models in these videos depend on computing?

Consider the strengths and weaknesses of each model. What understanding can be better drawn from the first model and what understanding can better be drawn from the second?

What questions could be answered using these two models?

From each group students share at least one response to each prompt.

Define and Identify Models and Simulations [10 min]

Examples of models (do not need to show the entire videos for student understanding):

 

  • Watch this video of a human heart simulation: Multi-scale Multi-physics Heart Simulator UT-Heart (5:15) (watch up to 2:00; the rest is interesting but not necessary).
  • What’s an advantage to having so many data points? What about a disadvantage? (A supercomputer is necessary to run the simulation.)
  • How can you test a parachute to be used on Mars? https://www.youtube.com/watch?v=_jOzxEOlDJg (1:11)? Describe the physical test. Before that test, they create models and simulate on the computer - why? (It is very costly to run a test and to create an actual parachute. First be sure an idea passes a simulated test, then build it.)

 

 

Examples of Simulations:

 

 

Have students find and share simulations in each of the following:

 

  • Financial (e.g., stock market forecasting)
  • Weather (e.g., predicting the path of hurricanes)
  • Space (e.g., predicting the path of an asteroid)
  • Sports (e.g., predicting championships)

 

Use Models and Simulations to Refine Questions [20 min]

 

  • Select one of the simulations explored today.
  • Write a question the simulation could help answer.
  • Run the simulation and write an answer to your question.
  • Exchange your results with your elbow partner.
  • Refine your elbow partners question
  • Write an answer to the new question.

 

Wrap Up (5 min)

Journal: Have students record the definitions (in their own words) of the vocabulary used in this lesson: probability, model, simulation, and hypothesis.


Evidence of Learning

Formative Assessment

  • Can students define models and simulations in their own words (and understand the difference)?
  • During the activity, are students able to identify particular characteristics that will be included in a model and simulation as well as characteristics that are to be excluded?

Lesson Summary

Summary 

Students will formulate a hypothesis, run simulations, and analyze the results to determine what needs to be modified in their hypothesis and/or the simulation itself.

Outcomes

  • Students will identify and create real-world examples of models and simulations.
  • Students will use models and simulations to generate new knowledge and to formulate, refine, and test hypotheses.
  • Students will use simulations to test hypotheses without the constraints of the real world.

Overview

  1. Getting Started (10 min)
  2. Guided Activities (35 min)
    1. Activity 1 - Rolling Dice Simulation, materials - large paper and markers or other method to share group work [15 minutes]
    2. Activity 2 - Using a Simulation to Test a Hypothesis [20 minutes]
  3. Wrap Up (5 min)

Source

The coin flipping extension is based on a CS10K lesson: https://sites.google.com/site/mobilecsp/lesson-plans/lp-coinflip-miniprojects

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP3: Construct viable arguments and critique the reasoning of others.

Common Core Math:

  • F-BF.1-2: Build a function that models a relationship between two quantities
  • S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable

Common Core ELA:

  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.8 - Evaluate the hypotheses, data, analysis, and conclusions in a science or technical text
  • RST 12.9 - Synthesize information from a range of sources

NGSS Practices:

  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking
  • 6. Constructing explanations (for science) and designing solutions (engineering)
  • 8. Obtaining, evaluation, and communicating information

Key Concepts

Students will be able to:

  • identify and create real-world examples of models and simulations.
  • use models and simulations to generate new knowledge and to formulate, refine, and test hypotheses.
  • use simulations to test hypotheses without the constraints of the real world.

Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How are algorithms implemented and executed on computers and computational devices?
  • 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?

Teacher Resources

Student computer usage for this lesson is: required

The PowerPoint "Using Data and Simulations" can be found in the Lesson Resources folder.

Penny Bias article to go with lesson extension: http://mathtourist.blogspot.com/2011/02/penny-bias.html

For the Monty Hall Problem extension:

Online simulation of the problem: http://math.ucsd.edu/~crypto/cgi-bin/MontyKnows/monty2?1+17427

There are several videos on YouTube demonstrating and explaining the Monty Hall Problem.

An animated video: https://www.youtube.com/watch?v=mhlc7peGlGg length is 5:48

Live action video: https://www.youtube.com/watch?v=4Lb-6rxZxx0 length is 5:30

There is sample code for the die Python program in the Lesson Resources Folder called 4-3 Sample Code.py

Lesson Plan

Getting Started (10 min)

Journal:

  • Models and simulations are simplified representations of more complex objects or phenomena.
    • What is a complex, everyday phenomena that is studied using models and simulations?
  • Models often omit unnecessary features of the objects or phenomena that are being modeled.
    • What features might a flight simulator program leave out to make the program easier to use and run faster?
  • Simulations mimic real-world events without the cost or danger of building and testing the phenomena in the real world.
    • What is something random that could be tested more easily with a computer than by building the real thing?

Have students share their answers with the class.

Guided Activities (35 min)

Activity 1 (15 min) - Designing a Simulation (rolling dice)

  1. Explain that many simulations include randomized events to simulate reality.
    • What unnessecary details can be omitted if you need to create a random outcome?
    • [Possible answers: you only need to choose a random number and then use selection to choose which block of code to execute as a result]
  2. Arrange the class into small groups (two or three).
  3. The groups are to develop an algorithm and write a program to simulate rolling a standard six-sided die.
    • The program should ask for the number of rolls and display the results (number of each possible outcome that was rolled).
    • Note: The students will need to use the randint function to write this code.
      • import random at the top of the code
      • random.randint(min,max) returns a 'random' integer between the min and max values (inclusive).
    • Remind students to use functions where appropriate.
    • Students are encouraged to write their plan (flow chart or pseudocode) on large paper or some other method to enable later sharing with the class.
  4. Have a representative from each group describe their plan for the algorithm. (After the first group, subsequent groups could highlight similarities and differences.)
  5. Next, have each group discuss and implement changes to their algorithm and programs to simulate rolling two dice. (When providing directions, ask the class how using functions in the previous exercise would make this change easier to implement.)
  6. As a class, discuss how many times the program should "roll" the dice. (Be sure students note that every possible value should be displayed, especially upper and lower bounds.)

Activity 2 (20 min) - Using a Simulation to Test a Hypothesis

  1. Each group should develop a hypothesis to answer the question: Can a twelve-sided die be used in place of rolling two six-sided dice? Each group should agree on a hypothesis and write it down.
  2. The groups already have a design for rolling two six-sided dice. They should now design an algorithm for rolling a twelve-sided die. (This process can involve creating a new function or modifying the current function's parameters to accept the number of sides.)
  3. The students should be paired up and begin writing the code necessary to test the hypothesis. 
  4. Once they finish the code, students should run both simulations to compare results. Note: Students need to save their code. They will be using it in the next lesson's homework.
  5. As students complete their simulations, if possible, have each pair share their data with the class (in a spreadsheet displayed by the teacher's computer, or on the white board, or large paper).
  6. As data is collected, students should determine whether their hypothesis was correct or whether it needs to be modified. 
  7. Analyze with the class if the simulations themselves were implemented correctly. (Does the data represent the expected theoretical outcomes? How can you modify the program to correct any errors?)

Wrap Up (5 min)

Ask the class: What are the advantages/disadvantages of using a program vs. actual dice? How quickly can the computer generate thousands of test cases? Can the computer be used to analyze the test cases as well as to generate the random numbers? 

Journal: Summarize how a program can be used as a simulation to test a hypothesis.


Options for Differentiated Instruction

Students can be provided with the code for a function to simulate rolling one die and use it to develop the rest of the program.

After the first group activity, the teacher can swap a student from each group to allow different input into the next group activity.

 

Extension #1 - Penny Flipping

This extension is based on advanced mini project # 4, which can be found here:  https://docs.google.com/a/smcps.org/document/d/1AKHpiQ87bE4W1YzHlAFh2uNAHuEtdMOCQVV6HfxfDzc/edit 

Students read an article about the 'randomness' of flipping a penny: http://mathtourist.blogspot.com/2011/02/penny-bias.html

Next, students should hypothesize the results of lining up 10 pennies on edge and knocking them over (as described in the article). Students need to determine how many times to run the experiment, collect data, and analyze the results. 

Students should work in pairs to write a computer simulation for the penny experiment. (Note: this is a program based on experimental data, not theoretical.)

Discuss as a class the validity of the simulation written. Can this simulation be used for other coins?

Extension - The Monty Hall Problem

In the game show "Let's Make a Deal", the original host was Monty Hall. Onvery show, Monty would present a player with three doors or curtains to choose from. The contestant was asked to choose a door in search of a prize. After making a selection, Monty Hall would open one of the doors not selected by the contestant to reveal a non-prize (perhaps a goat). Then Monty would ask if the contestant wanted to change their choice.

After explaining the show to the class ask, "Should the contestant change?" Students should propose a hypothesis.

Have the students design a simulation to test their hypothesis (discuss what is the data collected and the number of times the simulation should run to collect data). After running the simulation, students should evaluate their hypothesis and determine whether it needs to be modified or whether the simulation needs to be modified.

If Monty Hall had four doors, what should the contestant do?

What should the contestant do if they know that Monty does not know what is behind each door?

Online simulation of the problem: http://www.math.ucsd.edu/~crypto/Monty/monty.html

There are several videos on YouTube demonstrating and explaining the Monty Hall Problem.

An animated video: https://www.youtube.com/watch?v=mhlc7peGlGg length is 5:48

Live action video: https://www.youtube.com/watch?v=4Lb-6rxZxx0 length is 5:30


Evidence of Learning

Formative Assessment

Review student journal entries and class discussions to determine students' understanding of simulations, a hypothesis, and the ability to determine a method to test a hypothesis.


Summative Assessment

Describe an algorithm to simulate drawing an ace of any suit from a standard deck of cards. 

Make a hypothesis about drawing cards from a standard deck of cards and determine how to collect data to answer your hypothesis.

Lesson Summary

Summary

This lesson introduces students to reading information from an input file and writing to an output file as a functionality of Python programming. The students will then apply these concepts to program a simple Dice Roll application to generate data. This lesson will prepare students to read and write files for use in later Data Acquisition lessons.

Outcomes

  • Students will learn how to read from an input data file and write to an output file using the Python programming language.
  • Students will be able to apply their new knowledge to writing independent programs.

Overview

Session 1

  1. Getting Started (10 min) - Journal on the possible advantages/disadvantages of being able to input/output data.
  2. Book activity (40 min) - Students are guided through the properties of file I/O using the "Python for Everybody" book.

Session 2 

  1. Python Lab (50 min) - Students write a program to roll 2 six-sided dice and one 12-sided die and write the output to a file. They then import it to Excel as a txt or csv file and compare distributions using countif. (This exercise may be assigned as homework if students have the computing resources to complete a programming assignment as homework.)

 

Learning Objectives

CSP Objectives

Key Concepts

The students must understand how to open and read from an input file using Python.

The students must understand how to declare and write to an output file using Python.


Essential Questions

  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How do people develop and test computer programs?

Teacher Resources

Student computer usage for this lesson is: required

Python for Everybody by Charles Severance, http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf.

Explanation of the CountIf function in Excel https://support.office.com/en-us/article/COUNTIF-function-e0de10c6-f885-4e71-abb4-1f464816df34.

The mbox.txt and mbox-short.txt files are in the Lesson Resources Folder.

 

Lesson Plan

Session 1

Getting Started (10 min)

Think-Pair-Share

  • List some pros and cons of inputting data for a program using only a keyboard.
  • List some pros and cons of displaying output of a program using only video display.

Have students review their journal entries as a class and note the advantages and disadvantages on a white board.

Guided Activity (40 min)

Before Starting The Activity:

  • Have the students open the book Python for Everybody by Charles Severance http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf and navigate to Chapter 7 "Files" (page 79).
  • Students should also open PyCharm or the Runestone coding environment and create a new .py file. (Teachers may want to project PyCharm and the textbook on the board.)
  • The two files mbox.txt and mbox-short.txt are located in the Lesson Resources Folder. Students will need to have these saved in the same folder as their python file for the lesson.

Chapter 7: Files

The students should code the examples in the book as the teacher proceeds through the lessons.

  1. Section 7.1 Persistence
    1.  Emphasize the disadvantages of the loss of information when the computer is powered off and the frequent need to store data in a more permanent location.
    2. Introduce the concept of secondary memory.
  2. Section 7.2 Opening Files 
    1. After reading the brief text in Section 7.2, have students type the sample code to open the mbox.txt file and run it.
    2. Have students try to open another nonexistent file and see what kind of error they get.
    3. Check the student’s code for understanding:
      • Were the students able to open the mbox.txt file successfully?
      • Did the students get a “No such file or directory” error message when they attempted to open a nonexistent file?
  3. Section 7.3 Text Files and Lines
    1. Introduce the newline special character “end of line” which breaks the file into lines. In Python the newline is represented by “\n” in string constants.
    2. Have the students type in the sample code in 7.3 (page 81), which demonstrates the newline character’s function.
    3. Check the student’s code for understanding  
      • Did the “\n” cause the string to be displayed on two lines?
  4. Section 7.4 Reading Files
    1. Introduce the notion of reading each line in a file by using a while loop. (The students should already be familiar with for and while loops, but may need a quick review of the syntax.)
    2. Have students count the lines in the mbox.txt file by running the first sample code in 7.4 (page 82).
    3. Check the students’ code for understanding.
      • Does your code give the same output as in the book?
  5. Section 7.8 Writing Files
    1. Show the students how to open a file for writing by opening it with mode 'w' as a second parameter.
    2. After reading the brief text in Section 7.8, have students type the sample code to write to the output.txt file and run it. Remind them to use the newline character, “\n”, at the end of each line.
    3. Check the student’s code for understanding:
      • Were the students able to write to the output.txt file successfully?
      • Did the students remember to close their output file when finished? 

Session 2

Python Lab (50 min) 

Preparation:

Part 1:

  • Open the Python program(s) for rolling two six sided and one twelve-sided dice (students should have saved this from lesson 4-3).
  • Edit the code so it rolls the dice 1000 times and write the results of each roll to an output file named diceRolls.dat.

Part 2:

  • Import the diceRolls.dat file into your spreadsheet software (such as Excel) either as text or cvs file type.
  • Make use of the countif function to compare the distribution of the rolls for how many times each number 2 through 12 was rolled with the pair of six-sided dice to the distribution for the 12-sided die.
  • Show the comparison visually with an appropriate chart in your spreadsheet software.

 


Options for Differentiated Instruction

Have students work in pairs as the new concepts are introduced and practiced.

For a class needing more scaffolding: Work as a group. Have students take turns around the room to read aloud the brief text in each section in Chapter 7. Do the short exercises together with a "row captain" assigned to each row (or group) in the classroom who is in charge of checking that everybody in their row has completed each short task and has gotten the help needed to finish. Row captains help each other until the entire class has successfully completed each task. Report out on what challenges were encountered, recording problems and solutions at the front of the classroom as the class works. Rotate the role of row captain for each section.

For more independent students: Introduce/demonstrate the key ideas first and then allow student to work through Chapter 7 at their own pace.


Evidence of Learning

Formative Assessment

The teacher will check the student’s code for understanding.

The teacher will check for understanding as each new concept is introduced.

 


Summative Assessment

Exercise 7.1 Write a program to read through a file and print the contents of the file (line by line) all in upper case. Executing the program will look as follows:

python shout.py

Enter a file name: mbox-short.txt

FROM STEPHEN.MARQUARD@UCT.AC.ZA SAT JAN 5 09:14:16 2008

RETURN-PATH: <POSTMASTER@COLLAB.SAKAIPROJECT.ORG>

RECEIVED: FROM MURDER (MAIL.UMICH.EDU [141.211.14.90])

BY FRANKENSTEIN.MAIL.UMICH.EDU (CYRUS V2.3.8) WITH LMTPA;

SAT, 05 JAN 2008 09:14:16 -0500 

You can download the sample input file from https://www.py4e.com/code3/mbox-short.txt

Exercise 7.2 Write a program to prompt for a file name, and then read through the file and look for lines of the form:

X-DSPAM-Confidence: 0.8475

When you encounter a line that starts with “X-DSPAM-Confidence:” pull apart the line to extract the floating point number on the line. Count these lines and the compute the total of the spam confidence values from these lines. When you reach the end of the file, print out the average spam confidence.

Enter the file name: mbox.txt

Average spam confidence: 0.894128046745

Enter the file name: mbox-short.txt

Average spam confidence: 0.750718518519

 

Test your file on the mbox.txt and mbox-short.txt files. 

Lesson Summary

Pre-lesson Preparation

Your students will need computers for this lesson. If you would like to show students a working dartboard simulation (with a circular dartboard), check that your browser can run a Java plug-in. Be sure to update, activate, and disable the plug-in as needed for security purposes.

Summary

In this lesson, students will explore basic data analysis concepts in Python, learn about code extensibility, create a simple simulation from scratch, and reuse their code to make a more elaborate simulation.

Outcomes

  • Students will create a mathematical simulation and understand how programming can be used to model real-world processes.
  • Students will understand extensibility and code reuse by developing a simulation and modifying it to solve a more complex task.
  • Students will be able to reason about and solve a problem by programming a solution from scratch.
  • Students will collect and analyze data.

Overview

Session 1:

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
  3. Optional Homework

Session 2:

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
  3. Homework

Part of this lesson was adapted from http://www.nzmaths.co.nz/resource/dartboards and http://www.nzmaths.co.nz/resource/more-dartboards.

Learning Objectives

CSP Objectives

Key Concepts

The development of a program from scratch to solve a specific problem is presented to students by creating a simulation that lets them see how software can model a real-world process. Additionally, the concepts of extensibility and code reuse are shown through hands-on programming experience.


Essential Questions

  • How are algorithms implemented and executed on computers and computational devices?
  • How are programs used for creative expression, to satisfy personal curiosity or to create new knowledge?
  • How do computer programs implement algorithms?

Teacher Resources

Student computer usage for this lesson is: required

The Lesson Resources folder contains an example program showing how to use Python's random function to simulate tossing a coin, as well as a Dartboard.py solution. There is also a comparison between this python code, and some pseudocode that one may write before coding Dartboard.py, titled "Pseudocode vs Python."

An alternative lesson outline using Runestone and PyCharm to code a simulation and use it to develop, refine and test hypotheses in is the lesson folder. The lesson is in a file named "Monte Carlo Simulation to Calculate Pi.docx".

 

Lesson Plan

Session 1

Getting Started (5 min)

Think-Pair-Share: Writing programs "from scratch"

  • Ask your students to think about what it means to write a program "from scratch," how and why someone would do so.
  • Have your students pair off to share and list their ideas.
  • Collect and discuss their responses. Some topics to note could include: the importance of programming to solve a specific problem, the challenge of starting a program without copying someone else's code, and the value of learning to implement algorithms on one's own. The dartboard simulation used in this lesson provides a good example of a straightforward problem with a solution that someone can code on their own from scratch.

Guided Activity (45 min)

A Dartboard Simulation [10 min]

Get students' attention by asking them to play with the Dartboard Simulator (requires the Java browser plug-in) as they think about the following scenario and answer the related questions:

  • You have a circular dartboard consisting of three concentric circles. The largest outer circle has a radius of 3 units and is colored yellow. Inside that is the middle circle with a 2-unit radius, colored orange. In the center is a red circle, the bull's-eye, with a 1-unit radius. The final board looks like a red circle enclosed by an orange ring, enclosed by a larger yellow ring.
  • Now suppose you have a robot that throws darts randomly. How many darts would you expect to hit the bull's-eye if the robot throws 90 darts at your dartboard, assuming every dart hits the board? How many of those darts (on average) would hit the orange part of the board? How many would hit the yellow part?
  • To make the dartboard into a game, a certain number of points is awarded each time a dart hits a specific color. You want to assign score points to the dartboard fairly (for our random robot), such that the robot gets a score proportional to the chance it has of hitting a given color on the board. How many points should landing a dart on red be worth? On orange? On yellow?
  • Answers:
    • Recall that the formula for the area of a circle is A = pi*radius2. The red circle has an area of pi units. The orange ring has an area of 3*pi units (4*pi minus the area of the red circle). The yellow ring has an area of 5*pi units (9*pi minus 3*pi for orange and pi for red). The total area is 9*pi. Thus, on average, 50 of the darts would land on yellow, 30 of the darts would land on orange, and 10 darts would land on red.
    • For score assignment, since a single dart would hit yellow 5/9 of the time, orange 3/9 of the time, and red 1/9 of the time, we know that red is 5 times harder to hit than yellow and 3 times harder to hit than orange. Thus, a convenient assignment would be 15 points for red, 5 points for orange, and 3 points for yellow. With these score assignments, if the robot throws a dart it would score 5 points on average.

Devising a Dartboard Simulation [10 min]

Suppose you want to write a program that simulates tossing virtual darts. Each dart will land at a point on a square virtual dartboard that is one unit long on each side. Each point on this dartboard has both an x and a y coordinate, both of which are between 0 and 1. The bull's-eye is a square in the center of the dartboard with sides of length 0.5 units.

Have the program ask the user how many darts they want thrown. The program should then simulate throwing these darts by generating a random landing location (a random x and a random y coordinate) on the dartboard for each dart. Recall how to use Python's random functions (by reviewing the previous lessons' dice simulation). As darts are thrown, the program counts how many darts land within the center square, the bull's-eye. The bounds of bull's-eye are [0.25, 0.75] on both the x and y axes. Finally, the program should print out the number of darts thrown and the number that landed within that rectangle.

Have your students answer the following questions:

  1. Is the problem description clear enough that you could code this program on your own? If so, what information helps to make it clear? If not, what further explanations are needed?
  2. What are some variables you think your program will need, and what will you use them for?
  3. Are there any built-in Python functions that might be necessary or useful? If so, which ones?
  4. What other types of Python constructs are required for this program? Specifically, will you need an input assignment? A loop? An if statement? A print statement? What else?
  5. If you do need to use a loop, would it be better to use a while loop or a for loop in this program? Or will either work equally well? Why? If you think you can code the program without using a loop, explain why.
  6. Think back to the dice simulation you made. What are two or three ways in which your dartboard program will be similar to the dice simulation? What are two or three ways they will be different? 
  7. What percentage of darts thrown randomly at the dartboard will hit the bull's-eye? 

Programming the Simulation [25 min]

Take the rest of the class time to have your students begin programming their simulation. If they are not able to finish before the session ends, you may want to assign the program as homework, or devote the beginning of the second session to finishing the program. They will need their programs for the work in the next session.

You may want to remind students how to use Python's random function. The following code may be a useful example:

Example random coin flipping code (the python file is available in the Lesson Resources folder):

import random # Needed for random number generation

number_of_heads = 0

for i in range(0, 100):

x = random.random() # Generates a random floating point (decimal) number between 0 and 1

if x > 0.5:

number_of_heads = number_of_heads + 1

print "The number of heads in 100 coin flips is ", number_of_heads

Optional Homework

Have your students finish their dartboard programs, as they are needed in the next session. Alternatively, if they have finished their programs, you could assign the "Collecting and Analyzing Data" think-pair-share of the next session as a homework, to be discussed in the next session.

Session 2

Getting Started (5 min)

Journal: Making your programs extensible

  • Define "extensibility" for your students in the context of a program. Focus on the notion that we should plan for the future by keeping our code simple and organized logically. By doing so, we can more easily extend our code (add new features), reuse parts of our code in other programs, and more swiftly modify our program if the requirements change.
  • Have your students answer the following questions in their journals: "What are some reasons to make our programs extensible? What are some things that can go wrong if our code is not extensible?"

Guided Activity (45 min)

Collecting and Analyzing Data [10 min]

Think-pair-share: Collecting and analyzing data

  1. Ask your students to recall what percentage of darts randomly thrown will hit the bull's-eye.
  2. With the completed square dartboard program, have your students collect data by running their program entering increasing values for the number of darts to be thrown (1, 10, 100, 500, 1000, 5000, 10000, 50000, and so on), recording the output for each input (number of darts that hit the bull's-eye). For each pair of input and output, have them calculate the percentage that hit the bull's-eye (divide output by input, e.g., 12 hits / 50 thrown = 0.24, or 24% of the darts were hits).
  3. Have your students pair off and compare their data with that of their partner. Ask them to describe why the trends they observe in the data are there. Have them recall when they calculated the probability of the robot throwing darts at a circular dartboard.
  4. Gather your students and discuss as a class what can be observed from the data. Ideally, as you increase the sample size (number of darts thrown), you should be getting a more accurate measurement of how many darts hit the bull's-eye. As with the dart-throwing robot, the area of the center relative to the whole dartboard determines the percentage that hit. In this case, the center square has an area of 0.25 units2, and the rest of the dartboard has an area of 0.75 units2, so approximately 25% of the randomly thrown darts will hit the bull's-eye.
  5. Expand the discussion to consider whether or not this is a realistic or appropriate model for a real life situation. What factors would make it more realistic? (changing levels depending on the skill of the thrower?, using data from a real life dart game to determine precentages?, entering values for angle and force to determine the path of a dart?, have students brainstorm). Point out that the suitability of the simulation depends on how it will be used. 

Changing Requirements [30 min]

Discuss with your students how we often want to reuse our code for a new project, and how it is not uncommon when developing a program for the requirements to change. Both of these changes benefit from extensibility in code. Your students will get to test the extensibility of their dartboard program by reusing what they have to fit with a new objective: make a three-ringed circular dartboard. Point out that an iterative design process often starts with a simpler problem and then generalizes or extends that program to apply to other situations.

As before, this program should first ask a user how many darts they would like to throw. Then, it should use that input to simulate throwing darts at a circular dartboard. Finally, it should print the number of darts thrown, the number of darts that hit the bull's-eye, the number that hit the middle ring, the number that hit the outer ring, and the number that missed completely. This circular dartboard is similar to the one from the previous session's robot exercise: it has a central circular bull's-eye surrounded by a middle ring, which is in turn surrounded by an outer ring. The coordinates for this dartboard are: the center is at coordinate (0,0); the outermost ring is a circle with radius of 3; the middle has a radius of 2; and the bull's-eye has a radius of 1. Simulate throwing a dart by picking random x and y coordinates, each between -3 and 3. Since this range is a square, some darts may miss the dartboard completely. For this program, students may reuse as much of their square dartboard code as they need, but make sure to preserve their original program separately.

Homework

Have your students finish their circular dartboard programs and answer the following questions:

  1. How extensible was your square dartboard simulation? How much code were you able to reuse for your circular dartboard simulation, and what did you need to write from scratch?
  2. What are the major differences between the code in the programs and the way you approached coding them? Which did you find more difficult to program? Would it have been easier or faster to code the circular dartboard program from scratch?
  3. Collect data by running the circular dartboard program with various increasing inputs (1, 10, 100, 500, 1000, 5000, and so on) and record the output. For each input and corresponding output, calculate the percentage of darts that missed, that hit the outer ring, that hit the inner ring, and that hit the bull's-eye. What trends do you see in the data? How is the behavior similar and different to the square dartboard program?

Options for Differentiated Instruction

Note: graphics.py may be used with this lesson to create a visualization - http://mcsp.wartburg.edu/zelle/python/ppics2/code/graphics.py

Another Note: In order to run graphics.py, you may possibly need to save files in the same Python folder as the program being written due to student access and student space restrictions in your network, (i.e. if the link cannot point back to a network drive file due to restrictions).


Evidence of Learning

Formative Assessment

The students will produce two simulation programs on their own: the square dartboard simulation and the circular dartboard simulation.


Summative Assessment

The students will record their understanding of extensibility in their journal.

The students will gain experience collecting data in both sessions.

The students will think analytically about their programs by answering the questions in Session 1 and in the homework for Session 2.

Lesson Summary

Summary

This lesson teaches students to use simulations to develop, refine and test hypotheses. NetLogo, which is used throughout the lesson to illustrate the use of functional and data abstraction, is a programmable modeling environment for simulating natural and social phenomena. 

NetLogo is a variation of the Logo language instead of Python, so students are not expected to write new code in this lesson.  See http://www.ianbicking.org/docs/PyLogo_lightning.html for a comparison of Logo and Python. 

Outcomes

  • Students will understand that models are abstractions of real environments and will recognize the rationale for, and limitations of, modeling techniques to analyze problems.

  • Students will be able to compare abstractions in one programming language to another (Python vs NetLogo)
  • Students will recognize the use of functional and data abstractions in modeling.

  • Students will be able to develop and test hypotheses using an experimental approach in a modeling framework.

Overview

Session 1 - Modeling in NetLogo

  • Getting Started (8 min)
  • Learning NetLogo (40 min)
  • Wrap Up (2 min)

Session 2 - Models and Hypothesis Design

  • Getting Started (5 min)
  • Models and Hypotheses (20 min)
  • Model Selection and Hypothesis Development (25 min)

Session 3 - Hypothesis Testing

  • Getting Started (5 min)
  • Hypothesis Testing (40 min)
  • Wrap Up (5 min)

Note: This lesson introduces another programming tool and environment: NetLogo. Teachers may choose to complete only the first session (on the basics of NetLogo), to expose students to a new computational platform and way of thinking, to extend the ideas in Unit 4 about modeling and simulation.

Learning Objectives

CSP Objectives

Key Concepts

Students will understand that models are an abstraction of real environments and will recognize the rationale for and limitations of modeling techniques to analyze problems.

Students will recognize the use of functional and data abstractions in modeling.

Students will be able to develop and test hypotheses using an experimental approach in a modeling framework.


Essential Questions

  • How can computing extend traditional forms of human expression and experience?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How can computational models and simulations help generate new understanding and knowledge?
  • How are algorithms implemented and executed on computers and computational devices?
  • Why are some languages better than others when used to implement algorithms?
  • 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 does abstraction make the development of computer programs possible?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL. NetLogo tutorial packet online web version http://ccl.northwestern.edu/netlogo/docs/ 

Modeling and Simulation 101 video ( https://www.youtube.com/watch?v=X-6zxImekOE )

See http://www.ianbicking.org/docs/PyLogo_lightning.html for a comparison of Logo, PyLogo and Python. 

New Mexico "Computer Science for All" bases the entire course on modeling and simulation using NetLogo http://www.cs4all.org/NM-CS108L-Week3-Final 

Lesson Plan

Session One

Getting Started (8 min)

Question: Describe something that can be modeled using a simulation.

Introduce modeling and simulation using the first four minutes of the Modeling and Simulation 101 video ( https://www.youtube.com/watch?v=X-6zxImekOE ).  Students open a document for notes for today's session.

Students should record and briefly discuss these four statements about modeling and simulation:

  1. Models describe real-world activities using abstration, enabling testing of hypotheses at a fraction of the cost of actual experiments.
  2. Models can be expressed in computational, mathematical, textual, and/or graphical forms.
  3. Simulations are forms or instances of models that can be implemented as computer programs.
  4. Monte Carlo simulations exploit randomness to arrive at their results.

 

Learning NetLogo (40 min)

To start, all students should download NetLogo from this link http://ccl.northwestern.edu/netlogo/ or use the web version of the program.

Students should work through the NetLogo tutorial packet either in groups or as a class.

In particular, students should be encouraged to notice commonalities in programming languages (sequence, conditionals, iteration, abstraction) and how differences in languages provide specific tools best suited to particular problems. The domain of modeling and simulation is a huge area in computational thinking, and NetLogo is one of many languages well suited to problem-solving in this domain. Point out that Python is used for modeling and simulation, but to be clear and readable requires the abstraction of libraries to build on that provide the same functionality that comes with a language like NetLogo.

There will be some "thought questions" throughout that students should discuss in their groups and as a class.

 

Wrap Up (2 min)

Students should complete an exit ticket listing one interesting idea they learned, or one question they have about NetLogo or modeling.

 

Session Two

Getting Started (5 min)

Review yesterday's NetLogo lesson and ask the students to share what they learned, how NetLogo is similar to or different from Python, and any questions they have about how it works. Point out that it is the ABSTRACTION available in NetLogo that makes it easier to read and write simulation programs because it has features built into it that are readily available that you can build on. This PowerPoint details the abstractions in NetLogo with the accompanying transcript from CS for All in New Mexico. List abstractions available in Python that are different from NetLogo or PyLogo. What is built into each language that makes it easy to use? 

Models and Hypotheses (20 min)

Introduction (12 min)

  • Students start NetLogo and open the Art>Fireworks model.
  • Students use the interface Buttons for Setup and Go to run the simulation.
  • Have students read the information in the Info tab, and look through the code in the Code tab, to get a sense of what is being simulated and how it works.
  • Explain that the model is the description of the environment, while the simulation is the specific implementation of the model.
  • Think -Pair- Share: Ask the students to identify which aspects of the real-world environment (actual fireworks) are implemented in the model, and which aspects are not implemented.
  • Discuss with the class the fact that the simpler characteristics of the model or abstraction make the implementation of the model much easier, at the expense of a possible failure to represent key relationships.
  • Have the students examine the implementation (Code tab) and find the names of the five functions defined in the code.  Show where all 5 are called (three in the code and two in the Interface).
  • Discuss these facts about forming a hypothesis
    • A hypothesis is an educated guess about how things work.
    • A hypothesis is written like this: "If _____[I do] _____, then _____[this will result]_____
  • Explore hypotheses that could be tested by this model.  (Some hypotheses are suggested by the discussion in the Info tab -- e.g., "If gravity is set to 0, then ______."
  •  Ask:
    • What are two things that we can change through the interface?
    • What do we think will happen we we make those changes?

Activity (8 min)

Ask each student to write a hypothesis that can be tested with this simulation, share the hypothesis with elbow partners, and briefly experiment with the parameters to informally test the hypothesis.

 

Model Selection and Hypothesis Development (25 min)

Note: The "Hypothesis Testing Worksheet" which will be used for the next two lessons is available in the Lesson Resources Folder

For the rest of today's session and Session 3, students will work in teams of four students to select a model to experiment with, then divide into two partner sets to develop a hypothesis, devise an experimental plan, test the hypothesis, and write about their results.

Directions

  1. First divide the class into teams of four students, and have them spend 10 minutes exploring different models in NetLogo (which they should already have some familiarity with from Session 1 and the earlier part of Session 2). They should choose one model to focus on and write the name of the model in the corresponding part of the Hypothesis Testing worksheet, along with a short explanation of why they chose the model.
  2. For the next 10 minutes, they should study the parameters of the model and how it works, trying things out in the interface to see how changing the parameters affects behavior.
  3. In the final 5 minutes of the class session, split the teams into partner groups and have each partner group begin to develop hypotheses about the team's selected model.  You may wish to assign them to write these hypotheses down as a homework assignment, either together or individually, using the Hypothesis Testing worksheet to record their hypothesis, why they selected that hypothesis, and the experimental parameters they will use to test the hypothesis.

Session Three

Warm Up (5 min)

Partners should revisit their hypotheses, and choose one hypothesis to focus on first.  (They can test both hypotheses if they have time.)  Each partner pair should write the name of their model and their selected hypothesis on the board, to share with the other students.

Experimental Design (10 min)

  1. Students should use the Hypothesis Testing worksheet to:
    1. Identify an experiment that will test their hypothesis.
    2. Select one or more parameters to vary.
    3. Choose what settings they will use for these parameters.
    4. Determine what measurements they will record.
    5. Decide how many trials they will run at each setting.  
    6. Note: Be sure that students have completed their experimental design before proceeding to perform the experiment -- many students will want to just jump in and start trying things, but one goal of the lesson is to help them understand that having a clear hypothesis and experimental design before collecting data is an important part of the scientific process.

Hypothesis Testing (30 min)

For the next twenty to thirty minutes, students should carry out their experiments and record the appropriate measurements.  

At the end of the section or for homework, students should write up their findings in a short report, showing the data they've collected (optionally in a graphical form, particularly if assigned as homework), discussing what the data says about their hypothesis, and concluding whether the hypothesis is supported or refuted by the simulation.

 

Wrap Up (5 min)

Students should come back into their teams to share their findings, and discuss the advantages and disadvantages of using models and simulations to develop and test hypotheses.

 


Evidence of Learning

Formative Assessment

Students will share and post their hypothesis before testing and sharing the results. Teachers will verify that the hypothesis are falsifiable and testable by the simulations.


Summative Assessment

Students will select a model, develop a hypothesis, design an experiment, and use a simulation to test the hypothesis.

Lesson Summary

Pre-Lesson Preparation: Students need to have already chosen a topic and had it approved by the instructor. Students can use the following sources to help choose a data set:

http://www.data.gov/ , http://data.princeton.edu/wws509/datasets , http://www.statsci.org/datasets.html

Summary:  

This lesson is the summative assessment for Unit 4 on Data Analysis.    Students will select a data set and write a small Python program to analyze the data.  Students will then write a summary of their findings to demonstrate understanding of the data analysis process.  

Outcomes:

  • This unit assessment is designed to provide more practice in project based-work to prepare students for the final performance project at the end of this class.

Overview:

  1. Getting Started (5 min) - Overview of task for the day.
  2. Independent Activity (40 min) - Individually or in pairs, students collect and analyze data on their topic.
  3. Wrap Up (5 min) - Overview of homework goals and expectations.
  4. Homework: Individual two-page summary about their findings.

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP3: Construct viable arguments and critique the reasoning of others.
  • MP4: Model with mathematics.
  • MP5: Use appropriate tools strategically.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core Math:

  • S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable
  • S-ID.5-6: Summarize, represent, and interpret data on two categorical and quantitative variables
  • S-ID.7-9: Interpret linear models
  • S-IC.3-6: Make inferences and justify conclusions from sample surveys, experiments and observational studies

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • WHST 12.5 - Develop and strengthen writing as needed by planning, revising, editing, rewriting
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking

Key Concepts

Students will demonstrate their understanding of the process of collecting and evaluating data.


Essential Questions

  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How can computation be employed to facilitate exploration and discovery when working with data?
  • What opportunities do large data sets provide for solving problems and creating knowledge?
  • How are algorithms implemented and executed on computers and computational devices?
  • 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?

Teacher Resources

Student computer usage for this lesson is: required

Rubric provided on Google Drive - Rubric - Unit 4 Summative Assessment.htm in the lesson folder.

Lesson Plan

Getting Started (5 min)

Verify that every student has selected a topic (approved by the instructor in advance) and address what the goal is for today.

Independent Activity (40 min)

Students will either individually or in pairs (instructor's decision) create a small program that reads data from a file, analyzes it, creates a simple simulation and finally writes data to a file.  

 

Wrap Up (5 min)

Presentation about the expectations of the homework assignments.

 

Homework

Each student should create a 2-page typed summary that explains the following areas:

  • The chosen data 
  • Why the data topic was chosen
  • The analysis process
  • The results of the analysis process
  • The coding process used for data analysis

 

 


Options for Differentiated Instruction

Instructor has the option to have students work individually or in pairs for this assessment. 


Evidence of Learning

Formative Assessment

Review Rubric with class and clarify expectations.


Summative Assessment

Students will be assigned a unit project, with a topic of their choice, to demonstrate their understanding and mastery of the concepts of data collection and analysis.  

Lesson Summary

Summary

Big Data has been defined in many different ways. Easy access to large sets of data and the ability to analyze large data sets changes how people make decisions. Students will explore how Big Data can be used to solve real-world problems in their community. After watching a video that explains how Big Data is different from how we have analyzed and used data in the past, students will explore Big Data techniques in online simulations. Students will identify appropriate data source(s) and formulate solvable questions.

Outcomes

 

  • Students will explain how analyzing Big Data is different from the way ordinary data is analyzed.
  • Students will describe how computers can make predictions and answer questions through the use of Big Data, storage of data, and processing data.
  • Students will synthesize the relationship(s) between causation and correlation.

 

Overview

Session 1- What is Big Data?

 

  • Getting Started (10 min) - Journal
  • Guided Activities (30 min) – Reading and Video
  • Wrap Up (10 min) – Group Review
  • Homework

 

Session 2 – Where can big data be used?

 

  • Getting Started (5 min) - Journal
  • Guided Activities (15 min) – Processing Big Data
  • Independent Activities (25 min) – Online Research
  • Wrap Up (5 min) – Exit Slip

 

 

Learning Objectives

CSP Objectives

Essential Questions

  • How can computing extend traditional forms of human expression and experience?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • How can computation be employed to facilitate exploration and discovery when working with data?
  • What opportunities do large data sets provide for solving problems and creating knowledge?

Teacher Resources

Student computer usage for this lesson is: required

Reading assignment and video clips for Session 1: 

Possibly useful resource(s) for data collection:

Big Data Concepts:

Sample data sets (both acquired from http://catalog.data.gov/dataset) :

  • FailedBanklist.csv
  • Consumer_Complaints.csv

Lesson Plan

Session 1 - What is Big Data?

Getting Started (10 min) - Journal

Journal: How can a computer gather data from people ? (Think-Pair-Share)

Remind students of the mind guessing game: http://en.akinator.com/ or 20 questions http://www.20q.net/ 

Discuss: How can the computer learn from people when playing one of these games? How many different answers do you think it could possibly know? 

Teacher note: students are not expected to actually play this game during class.

  • Students should document in their journal the answer to this question: How does this game store all of the possible answers?
  • Ask 3 students to share their answers. (Possible strategies to select a random student: random.com, or pick a random student name stick from a cup.)
  • This activity should lead into today’s lesson on how large amounts of data are stored and then accessed as needed in a system.

Guided Activities (30 min) - Reading & Video

Read The Rise of Big Data in chunks: An Introduction to “Big Data” (20 mins) Reading can be found at: http://www.foreignaffairs.com/articles/139104/kenneth-neil-cukier-and-viktor-mayer-schoenberger/the-rise-of-big-data


Break students into groups or pairs and jigsaw the seven units of the reading. Each group is to summarize their section in a tweet sized comment (not more than 140 characters).


Share tweets with the class.


Explain to students that big data is impacting every area of life. By using more data and processing power we can make better decisions. As an illustration, show a clip from the movie Moneyball: (3 mins) https://www.youtube.com/watch?v=rMObWsKaIls
After students watch, they create a journal entries explaining at least two ways data was used to better manage the baseball team. Partners discuss journal entries. Share at least one observation with table groups and then share at least one observation from each group with the class.

Show the first 3-5 minutes of this clip. (It becomes a bit dry, so just show the amount that is appropriate for your students to get the idea): https://www.youtube.com/watch?v=7D1CQ_LOizA

 

  • What are the 3 V's? List some details about each V.
  • (at 4:40) What is Hadoop and how is it used?
  • Identify appropriate data source and form questions
  • Extract data source into format supported by underlying tools
  • Normalize data (remove redundancies, irrelevant details)
  • Import data into tool
  • Perform analysis
  • Visualize results

 

 

Some other concepts to point out to students if there is time:

Some examples of how big data is used:

 

  • Netflix and Amazon use it to improve user recommendations
  • Dominos used it to determine that more people order pizza when it is raining so they now base some of their ad campaigns around weather patterns
  • Help police predict when and where crimes will appear

 

Some examples of how big data was inappropriately used:

 

  • In 2012 Target store's “outing” a teenager’s pregnancy
  • In 2012 Google spent 22.5 million on a settlement over allegations that they secretly tracked user’s web surfing
  • In 2012 Facebook spent 20 million to settle a lawsuit that alleged that they used user pictures without the user’s knowledge to endorse products that they “liked”
  • In 2013 the revelation of the NSA using big data for national security concerns

 

 

 

Wrap Up (10 min) – Group Review

  • Place students in groups of 4 where the first student is A, the next is B, etc. Each group creates a single sheet of paper with the letters across the bottom and the numbers 1 - 5 to demonstrate the level of understanding of each concept. Students should plot their understanding for each respective concept (see list below) on the graph. (The file "BigDataSampleDotGraph" in the lesson resources folder shows an example.)
  • Collect this graph as a level of student’s understanding of the concepts in the video.
  • Review each concept using the notes below.
    • Big data is kind of like drinking water from a fire hose. It's too much to process for a small pipeline…
    • A. The three “Vs”: Volume, Variety, and Velocity
    • B. Big Data processing steps:
    • C. Tools for processing big data:
      • Microsoft Excel (or some type of spreadsheet tool - i.e. Calc is another one)
      • Hadoop - a well known big data tool, provided by Apache, requires extensive programming knowledge to set up and use
      • SAS - provides a more intuitive interface and better graphical representations of data
      • Google Prediction API - takes advantage of machine learning to extract meaning from data
      • BitDeli - lightweight, easier to use version of Hadoop
    • D. Very few restrictions on use of big data
      • Companies collect large amounts of data on their customers
      • Can be sold to other companies
      • Can be sold to the government
      • Can be used to “de-anonymize” someone

Homework

Students are to pick three topics they want to research that use big data. It is preferred that these topics relate to something learned this year in the course (e.g., the need for IPv6). Tomorrow, as the students enter class, they will sign up on a list with their chosen topic. Since the students will have three options, it is likely they will get one of their selected topics to research.

Session 2 - Where can Big Data be used?

Getting Started (5 min) - Journal

Journal: Think about you daily and weekly activities. What types of data are being stored about you?

Remind students to think about what they do online, in stores, while in a car, etc.

Guided Activities (10 min) – Processing Big Data

Review the steps to processing Big Data:

  1. Identify appropriate data source and form questions
  2. Extract data source into format supported by underlying tools
  3. Normalize data (remove redundancies, irrelevant details)
  4. Import data into tool
  5. Perform analysis
  6. Visualize results

As a class, walk through these steps using the two files in the lesson resources folder (FailedBanklist.csv & Consumer_Complaints.csv)

Step 1.

Demonstrate how files such as these can be obtained at http://catalog.data.gov/dataset

Formulate questions such as:
Are there any banks that are on both the complaint list and the failed banklist?
Can we make some deductions about banks that may be on both lists? If so, what deductions can we make?

Step 2.

Extract data source into format supported by underlying tools

Open one of these files in Notepad (or some simple editing program such as Notepad++) and demonstrate how the actual data itself is separated by commas, thus the file name “csv” for comma separated value.

Open both files in Microsoft Excel. Complete a find for the bank name “Banco Popular de Puerto Rico” on both lists. You may want to first sort the data by bank name to find this bank or you can use CTRL + F to find the bank name (see screenshots below).

Step 3.

Normalize data (remove redundancies, irrelevant details)

In this step, there is technically no need to remove redundancies or irrelevant details but you can show the students how you could remove data or limit the data to a particular data set. For example, if were to want to look at only the banks from Maryland, you can use the filter tool to only view those banks from MD.

Step 4.

Import data into tool

Right now the file type is as a csv file. By resaving the file as a .xlsx file it becomes a true spreadsheet file. 

Step 5.

Perform analysis

We have determined that the bank “Banco Popular de Puerto Rico” is on both lists. Now ask the students “Why is this bank on both lists?” Note: On the Failed Bank list the Banco Popular de Puerto Rico is actually an acquiring institution. By looking more closely at the dates of the acquisition of the failed bank “Westernbank Puerto Rico” one can formulate some possible deductions that maybe the reason “Banco Popular de Puerto Rico” is on the complaint list is because they had recently taken over a failed bank. It could be possible that some of these complaints were related to this recent acquisition.

Step 6. 

Visualize Results

Explain to students that they will learn more about visualize their results in Unit 6. They can complete graph visualization in excel. Show them the website: http://www.gapminder.org/. Explain that even though a visualization in excel is not interactive like http://www.gapminder.org/, they can complete some form of visualizing their data by using a spreadsheet. Note: http://www.gapminder.org/ is VERY attention grabbing. Only briefly show the students what they can do with it (see how data changes over time, look at many different data sets, and download data in different forms - including csv and xlsx formats).

Independent Activity (30 min) – Online Research

Students should research their selected topics from homework. Some possible websites for finding data are listed above under “Possible good resource(s) for data collection.”

Students are to get your approval for a topic and then use the Big Data Sets Worksheet in the Lesson Resource Folder to find big data sets that are related to the approved topic. 

Wrap Up (5 min) – Exit Slip

Students are to review using http://www.gapminder.org/ looking specifically at life expectancy. Students will write one question after “playing” the timeline of life expectancy using gapminder on an exit slip before leaving class. For example, one may write “Why is the life expectancy of countries such as Denmark, Sweden, & Norway typically higher than other countries throughout most of the timeline?”


Evidence of Learning

Formative Assessment

Students are to submit a document stating their topic for research using Big Data. This document should answer the questions:

Topic:
How is Big Data used to solve or remedy the topic?
Link(s) used to find Big Data? (i.e. data.gov, etc)


Summative Assessment

How has the transformation of data storage affected how data itself is used? 

Answer: Storage and processing of large digital data enables us to analyze large data sets quickly rather than small sampling sizes as used before. 

How can a computer use Big Data to make predictions? 

Answer: Computers can use smart algorithms, powerful processors, and clever software to make inferences and predictions for solvable questions.

Lesson Summary

Pre-Lesson Preparation

  • Teachers will need to have a piece of paper with a unique number on it for all but one student in the class.
  • Students will need access to the datasets and Python skeleton code in the Lesson Resources folder.
  • Teachers will need to print out the "Search Comparison Worksheet" for each student.

Summary

Students investigate data organization, simulate linear and binary searches, and write pseudocode and Python for linear and binary search methods.

Outcomes

  • Students will demonstrate how combining data sources and classifying data are part processing data
  • Students will describe challenges to structuring large data sets for analysis
  • Students will identify how the order of data influences which methods are appropriate for searching the data.
  • Students will describe standard search algorithms in pseudocode and in Python.
  • Students will Compare different algorithms for efficiency when searching for an item.

Overview

Session 1

  1. Getting Started (5 min) - Journal
  2. Class Discussion and Activities (25 min) - Introduction to linear and binary search algorithms
  3. Coding Linear Search (20 min)

Session 2

  1. Getting Started (5 min) - Think-Pair-Share 
  2. Coding Activity (30 min) - Write pseudocode and implement binary search
  3. Compare Searches (15 min) - Fill out worksheet to compare search algorithms

Source

Phone book presentation adapted from a lesson taught by Dr. Rheingans in CMSC 201 at the University of Maryland, Baltimore County

 

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP6: Attend to precision.
  • MP7: Look for and make use of structure.

Common Core Math:

  • F-BF.1-2: Build a function that models a relationship between two quantities

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure

NGSS Practices:

  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 5. Using mathematics and computational thinking

Key Concepts

Students will:

  • Demonstrate how combining data sources and classifying data are part processing data
  • Describe challenges to structuring large data sets for analysis
  • Be able to identify how the order of data influences which methods are appropriate for searching the data.
  • Be able to describe standard search algorithms in pseudocode and in Python.
  • Compare different algorithms for efficiency when searching for an item.

Essential Questions

  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How can computational models and simulations help generate new understanding and knowledge?
  • How can computation be employed to help people process data and information to gain insight and knowledge?
  • What considerations and trade-offs arise in the computational manipulation of data?
  • What opportunities do large data sets provide for solving problems and creating knowledge?
  • 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 do computer programs implement algorithms?
  • How does abstraction make the development of computer programs possible?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

Student computer usage for this lesson is: required

In Lesson Resources Folder:

  • Search Comparison Worksheet to use at the end of Session 2
  • DataSets folder that contains the six datasets for the Search Comparison Worksheet
  • SearchCode.py contains skeleton code for a numeric search program
  • Binary Search in LISP example to show on the screens.

Lesson Plan

Session 1

Getting Started (5 min)

Journal: What would be the best way to organize a collection of DVDs so that you could find the one you want very quickly? Would you need a different method for a radio station with thousands of DVDs? Discuss.

Class Discussion and Activities (25 min)

Linear Search Discussion (5 min)

As a class, discuss the following questions:
What if you are looking for a specific song. What is the most effective way to look for something if it is in an unordered, unsorted collection?
What are some challenges to organizing large sets of information so they can be processed?
Why does it help to classify data when you are trying to sort it or search through it?

Possible Answers and suggestions for discussion:

  • You can search Randomly (How do you stop yourself from repeating yourself?)
  • You can search One-by-one, marking off which ones have already been checked.
  • You can divide up the problem and each search a pile (multiprocessing)
  • Challenges: data entry is time consuming. Large sets of data are more important to keep organized but if you combine information from multiple places they might be organized differently so you have to come up with a single system.
  • If you don’t classify the information you’re sorting or searching such as the album title, song title or other searchable information, it would be very confusing to try to find what you are looking for, especially if you don’t know exactly what you are trying to find.
  • Having things grouped by artist, genre, or other categories makes it easier to narrow down what you're looking for.

Linear Search Activity (5 min)

  1. Pass out pieces of paper with numbers on them to everyone in the class except one person. Students should not share their numbers with anyone.
  2. Have everyone stand at the front of the room in a line. The person without a number stands in front and is assigned a number to look for. The class should keep track of how many people they have to ask before they get the number (students that have been checked should sit down).
    • Do this activity a few times. In between, each student should switch with another student a couple of times without showing their paper. (Note: A fun way to do this might be a snowball fight if you can)
    • Ask for a number that does not exist in the set at least once. What happens? How many people does it take before they figure out the number is not in the set?
  3. Have everyone sit down but keep their papers.

Binary Search Discussion and Presentation (10 min)

Take out a dictionary (or phone book). Ask the class, how would you search for a particular word/name?

Steps for Binary Search in a book of items to demonstrate to the class:

  1. Flip to the middle and pick a word in the middle of the page
  2. Is your word higher or lower than this word? If it is higher, “throw out” the lower half of the book. If it is lower, “throw out” the top half. (Not literally unless it is a very old phonebook. Students do love it when you tear up the phonebook, though, and it makes for a very effective demonstration.)
  3. Repeat steps 1 and 2 until you find the word.

Why would this not work for an unordered list?

Binary Search Activity (5 min)

  1. Have everyone go to the front of the room and get in numerical order by paper. Repeat the search activity using the binary search algorithm.
  2. Try with a number not in the list. How can you tell when it doesn’t exist?

 

Coding Linear Search (20 min)

  1. Have students work in pairs to write a code for linear search. The code should:
    1. Read in a csv file that has a list of unordered numbers. (They should input the file name from the user.)
    2. Ask the user what number they want to find and validate that number.
    3. Tell the user whether the number was found. If it was, it should output the number of items it had to look at.
  2. Students should save their code for the next day.

Note: Skeleton code (SearchCode.py) is provided in the Lesson Resources Folder.

Session 2

Getting Started (5 min) 

Think-Pair-Share

  • Ask students to list non-numbered, real-world things that they search for or sort/order in their daily lives.
  • Can all data be sorted, or do types of data exist that cannot be sorted? How would you organize and search these types of data?
  • Is there always a "correct" solution when sorting data?

Coding Activity (30 min)

Part 1 Pseudocode (10 min)

  1. As a class, write down the steps for Binary Search on the board.
  2. In pairs, have the students write pseudocode to implement binary search.
  3. When finished, display binary search code in other languages. (Scratch https://scratch.mit.edu/projects/23163175/; javascript https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/a/implementing-binary-search-of-an-array ; LISP (see handout)

Part 2 Coding (20 min)

  1. Students should use their pseudocode to write a program for binary search. (It would be useful to build on the skeleton code provided for linear search.) The code should accomplish the same things as linear search: read in a file, get a number, and output if the number is found and how many items were checked.

Comparing Searches (15 min) – (May also be Homework if programs are not finished)

  • Pass out the worksheet "Search Comparison Worksheet" from the lesson resources folder.
  • Students should run both their linear and binary search programs with the six provided datasets of increasing sizes, (also in the lesson resources folder.)
  • As they go through, students should record their results in the worksheet and answer the questions at the bottom.
  • Discuss the results as a class.

Options for Differentiated Instruction

For students that have difficulty understanding the concepts of searching for items in a set of data, pair those students with a student who has a firm grasp of the concept for the activities. Have the pair work together for 1A and then have them keep their own paper secure using the extra game sheet (1A').  Simiilarly for 1B - 1B' and 1C - 1C'.


Evidence of Learning

Formative Assessment

Correctness of Python functions for linear search and binary search


Summative Assessment

"Searching Assessment Items.docx" in lesson folder

"Search Comparison Worksheet" in the lesson folder

Lesson Summary

Summary

In this three-session lesson, students explore and confront the difficulties of the problem of sorting data and the difficulties involved in expressing a clear and efficient algorithm for sorting. 

Outcomes

  • Students will be able to relate a real-world task such as sorting cards to sorting/organizing information in a computer.
  • Students will understand the problem of sorting and why it is nontrivial for large data sets.
  • Students will be able to describe in pseudocode simple sorting algorithms (such as bubblesort).
  • Students will be able to reason about the correctness and efficiency of different sorting algorithms, and will understand that the time required to sort a data set increases as the size of the data set grows.

Overview

Session 1:

  1. Getting Started (5 min) - Journal
  2. Activity Card Sorting (40 min)
    1. Explain the Problem [10 min]
    2. Paired Activity: Algorithm Creation [30 min]
  3. Wrap Up (5 min)

Session 2:

  1. Getting Started (5 min) - Journal
  2. Group Activity: Algorithm Evaluation (20 min)
  3. Group Activity: Algorithm Selection and Justification (20 min)
  4. Wrap Up (5 min)

Session 3:

  1. Getting Started (10 min) - Journal and short discussion
  2. Guided Activity: Algorithm Analysis (10 min)
  3. Paired Activity: Algorithm Analysis (20 min)
  4. Wrap Up (10 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.
  • MP8: Look for and express regularity in repeated reasoning.

Key Concepts

The algorithmic techniques and analysis involved in sorting data are seen in a wide variety of contexts and applications. Sorting numbers in a list is challenging but foundational to many algorithms in computer science. 


Essential Questions

  • How can computation be employed to facilitate exploration and discovery when working with data?
  • What considerations and trade-offs arise in the computational manipulation of data?
  • Why are some languages better than others when used to implement algorithms?
  • What kinds of problems are easy, what kinds are difficult, and what kinds are impossible to solve algorithmically?
  • How are algorithms evaluated?
  • Which mathematical and logical concepts are fundamental to computer programming?

What makes a "good" algorithm?

What should be taken into consideration when comparing algorithms that complete the same task?

Teacher Resources

Student computer usage for this lesson is: optional

  • You will need enough playing cards for every pair of students to have eight different cards. Alternatively, you may make your own cards (e.g., using index cards) with different numbers on them in place of playing cards.
  • Handout - Sorting Algorithm Evaluation Student Worksheet.docx (in lesson folder)
  • Video collection - https://www.youtube.com/user/AlgoRythmics/videos
    • Note: If students do not have access to computers to individually watch the sorting videos during the paired activity in Session 3, you could instead choose one of the algorithms and show it to the class, having all pairs complete the algorithm evaluation handout for that selected method.

 

Lesson Plan

Session 1

Getting Started (5 min)

Journal: Have students respond to the following questions:

  • If you had 1 million books, and you had to be able to find any book by its title as fast as possible, how would you organize them? 
  • How many books would you need to look at in the worst case scenario to find the title before you have organized the books?
  • How many books would you need to look at in the worst case scenario to find the title after you have organized the books?

Teacher note: Having just finished the lessons on searching, students should recall that searching an ordered list allows using the binary search which is faster than searching an unordered list with a linear or random search.

Activity: Card Sorting (40 min)

Teacher note: The focus should be directed more toward the problem-solving technique than nitpicking about the language used. Although students are writing instructions for a human to manipulate a set of playing cards, they still need to be precise, because the assumption is that the person doesn't know what they are doing. This problem is challenging and will require creativity.

Explain the Problem [10 min]

  • Demonstrate the card sorting sorting task as you explain.
  • Clarify the goal: Today, you and a partner are going to design an algorithm and list the instructions for a person to arrange a row of playing cards into order (from lowest to highest value).
  • Explain the basic rules:
    • If a card is on the table, it must be face down.
    • You can only see the value of a card by picking it up and looking at its face.
    • You can only be holding and looking at two cards at a time (1 in each hand).
    • You can compare the values of any of the cards you are holding in your hands and determine if one is greater, less than, or equal to the other card.
    • When you put a card down, try to be clear about where it should be put back down.  Cards should be put face down.
    • You cannot use your memory of face-down cards to make decisions about them. You should behave as though you have no recollection of cards that you aren't currently holding.
    • You will have eight cards to practice, but the procedure you follow should be general enough to work for any number of cards.
  • Ask the students whether there are any questions about the rules.
  • Suggest that it could be helpful to break the task down into parts. Using abstraction and collaboration can decrease the size and complexity of the task that each programmer has to solve. Abstraction allows you to build upon existing processes, collaboration allows you to break up the task once you agree on what the strategy is and what the separate tasks are that need to be solved. Example, cards need to be comared and swapped, one person could write the specific steps for how that should be done.

  • Emphasize to students that there are *many* ways to achieve this task. Be creative. As a class, they should try to come up with as many different ways of sorting as possible.

Paired Activity: Algorithm Creation [30 min]

  • If there is an odd number of students, there could be one group of three students.
  • Distribute the cards to student pairs. The cards can be ordinary playing cards, but each pair should receive cards from the same suit that have been shuffled.  Alternatively, you can use handmade cards with arbitrary numbers on them. Before starting, have students agree on the ordering of the cards (e.g., whether aces are high or low). 
  • Have students write their instruction list (algorithm) on a piece of paper.
  • The format of the instruction lists is up to the students; they can create a numbered list, a flow chart, a diagram with text and arrows, or other means of communication.
  • Students should be working productively for the rest of the class: designing and writing their card sorting algorithm.
  • Circulate around the room to make sure that students are on task and that they understand the rules and goals of the activity.

Wrap Up (5 min)

Journal: 

  • If you were to give your algorithm a name that describes how it sorts, what would you name it?
  • Identify the most difficult part of writing down the instructions for your algorithm.

Homework:  Any pairs that did not finish the activity should complete it as a homework assignment before the next session.

Session 2

In this session, students review the sorting algorithms they wrote in session 1. Students will follow the algorithms created by their classmates and discover a variety of sorting strategies. By analyzing the various algorithms, students will attempt to find the "best" sorting strategy.

Teacher note: There are two main difficulties in algorithm design to highlight: (1) It is very difficult to be precise with language without some agreement about what terms mean. (2) Solving the problem by determining the strategies and steps required to sort objects correctly, as well as efficiently, presents a second level of difficulty.

Getting Started (5 min)

Journal: How do you think a sorting algorithm should be "measured" to determine if it is the "best"? Ask for ideas and discuss this during the group activity.

 

Group Activity: Algorithm Evaluation (20 min)

  • Distribute the "Sorting Algorithm Evaluation Student Worksheet.doc" (in the lesson folder).
  • Discuss: How will you determine which algorithm is better and why? How do you define “better”? What criteria will you use?Give students an opportunity to respond individually and collectively. Optionally, you may use a think-pair-share approach or small groups to develop ideas and then share with the class. Solicit student ideas and try to agree of 4 criteria to write down on page 2 of the student worksheet.
    1. Does it work correctly? (correctness)
    2. Is it well written and easy to follow?
    3. Is it efficient in terms of time? Is it efficient only under certain conditions?
    4. Is it efficient in use of space? Do you need a lot of extra table room as temporary places to arrange the cards in the process of sorting?
  • Re-distribute playing cards to student pairs.
  • Instruct students to follow directions on the Sorting Algorithm Evaluation worksheet and use it to record their experiences.
  • At the end of the session be sure to point out:
    • An efficient algorithm for a problem can help solve larger instances of the problem.
    • What looks more complex in code may actually be a more efficient solution.
    • Different correct algorithms for the same problem can have different efficiencies.
    • An advantage of doing this collaboratively is that it can decrease the size and complexity of the task that each programmer has to solve.

Group Activity: Algorithm Selection and Justification (20 min)

Create groups of four by joining the pairs who previously exchanged algorithms.  

Teacher note: This "swapping algorithm" activity works especially well when students exchange algorithms with a group that has a fundamentally different approach. However, as a practical matter, this can be hard to arrange. From your observations during Session 1, you might have a sense of groups with different approaches that you can assign to swap algorithms.

  • Groups should give feedback to each other about the algorithm, making sure to discuss:
    • The algorithm's correctness - does it work; do you understand it; could you simulate it or act it out?
    • Explain confusing/ambiguous parts of the other group's algorithm in order to help them write it better.
    • Discuss which of the two algorithms is "better" and be able to explain why.
    • Each group of 4 will nominate one of the two algorithms as the better one of the group.
  • Ask each group to volunteer the better algorithm at their table.
  • Act out/simulate one group's instructions.

Teacher note: It is possible that the nominated algorithm won't work perfectly. If you encounter any problems with the directions, give them the benefit of the doubt and simulate it as best you can to enable the class to understand the intent.

  • Ask if other groups solved the problem with a different strategy and demonstrate a few groups' algorithms.
  • Engage students in a discussion about which algorithm was the best. Why is it best? How should algorithms be evaluated?
  • Ask students to argue for one method or another and explain their reasons.

Teacher note: The students will perform an actual analysis in a later lesson, so it's okay at this point to simply guide the discussion to see how students are thinking. They will re-examine these ideas later.

  • Point out to the students that the speed at which the actor can follow the algorithm is not a measure of the algorithm, but rather the speed of the person. As an analogy, you might compare a person's walking speed with the distance they have to travel. To compare algorithms, you need to measure some "units of work". What those units are is debatable, but must to be agreed upon. For card sorting, "work" could mean picking a card up, putting it down, comparing with another card, etc.

Wrap Up (5 min)

Remind students of the two main issues in writing effective algorithms:

  • The need for a clear, unambiguous language for expressing algorithmic solutions.
  • Defining criteria for determining whether an algorithm is "good."

Homework:  Assign students to write a final version of their algorithm, working out any ambiguities or other problems revealed during the activities.

Session 3

In this session, we end the set of sorting activities by relating sorting to algorithms in the real world. A further exploration of algorithm analysis with some new algorithms will sharpen their intuition about what should and shouldn't be "counted" when analyzing algorithms, what is "hard" for a computer to do, or what takes a "long time."

Getting Started (10 min)

Journal: discuss ideas and elements from the previous lesson:

  • What is "work" for a computer?
  • Why would the efficiency of an algorithm be measured in terms of both speed and amount of "space" (memory) required?
  • Why does it matter how an algorithm (or program) will be used to decide if it is an appropriate solution?

Teacher should clarify that in general, we want these things from an algorithm:

  • To provide a correct solution for any given input.
  • To use computational resources as efficiently as possible.
  • The suitability of a solution depends on how it will be used. Some sorting algorithms work best in terms of time or memory used, others excel at particular situations like sorting a list that is already mostly sorted but work poorly on lists that are badly out of order.

Guided Activity:  Algorithm Analysis (10 min)

Paired Activity: Algorithm Analysis (20 min)

  • Assign each pair a different sorting algorithm.
  • Have each pair watch their assigned sorting video and complete the Sorting Algorithm Evaluation for that method.
  • Have each group attempt to write pseudocode for their assigned sorting algorithm.  Some of the algorithms are quite complex, so emphasize to the students that the goal of this exercise should be to think about what's happening, rather than to get it completely "right." 
  • Compare this algorithm to the one you developed.
  • What basic steps do the algorithms have in common? How can abstraction make it easier to solve similar problems by building on existing solutions?

Wrap Up (10 min)

  • Instruct students to discuss the following prompts with an elbow partner and then, collaboratively write a response in their journals that incorporates the ideas of both partners.
    • What should and shouldn't be "counted" when analyzing algorithms?
    • What is "hard" or time consuming for a computer to do?
    • Why is the efficiency of algorithms important?
  • Assign homework for next lesson on comparing algorithms (Unit 5, Lesson 4): Identify in your journal two places that you often travel between. Of the alternative routes available, what do you consider to be the best route? Why? Are there circumstances in which an alternate route is better? When is that the case?

     

 


Options for Differentiated Instruction

Suggestion: If you have a mix of new and advanced students, challenge the advanced students to sort twice as many cards with a parallel processing algorithm of their own design. Each student on the team can perform one action at the same time. 


Evidence of Learning

Formative Assessment

Evaluation of algorithms

Convert actions into an algorithm


Lesson Summary

Pre-lesson Preparation: You should familiarize yourself with www.sorting-algorithms.com paying particular attention to the variety of algorithms and settings along the top of the page. For session 2, you should have the timedsorts.py code and data files (in the lesson folder) readily available for your students.

Summary

In this two-session lesson, students will explore algorithmic efficiency. They will understand the idea through discussion, manual analysis of simple algorithms, and data collection for implemented algorithms.

Outcomes

Students will be able to:

  • identify algorithms that have different efficiencies in their problem solving approach.
  • explain the metrics used to describe efficiency.
  • perform an empirical analysis of sorting algorithms by running the algorithms on different inputs.

Overview

Session 1:

  1. Getting Started (5 min) 
  2. Guided Activity (40 min)
    1. Good Algorithms and Better Algorithms (5 min)
    2. Algorithmic Efficiency (10 min)
    3. Computational Complexity (10 min)
    4. Comparing Sorting Algorithms (15 min)
  3. Wrap Up (5 min)

Session 2:

  1. Getting Started (5 min)
  2. Empirical Investigation (40 min)
    1. Introduction (5 min)
    2. Experimental Design (10 min)
    3. Data Collection (25 min)
  3. Wrap Up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP5: Use appropriate tools strategically.

Common Core Math:

  • S-ID.1-4: Summarize, represent, and interpret data on a single count or measurement variable
  • S-ID.5-6: Summarize, represent, and interpret data on two categorical and quantitative variables

Common Core ELA:

  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products
  • WHST 12.7 - Conduct short as well as more sustained research projects to answer a question

NGSS Practices:

  • 1. Asking questions (for science) and defining problems (for engineering)
  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 8. Obtaining, evaluation, and communicating information

Essential Questions

  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How can computational models and simulations help generate new understanding and knowledge?
  • What kinds of problems are easy, what kinds are difficult, and what kinds are impossible to solve algorithmically?
  • How are algorithms evaluated?

Teacher Resources

Student computer usage for this lesson is: required

Sorting:

Lesson Plan

Session 1

Getting Started (5 min)

Think-Pair-Share: Alternate Routes

  • If you assigned the homework from the previous lesson, ask your students to get out their journals to discuss their entries. If not, you could have them write a response in their journal to the following prompt:
    • Identify two places that you often travel between. Of the alternative routes available, what do you consider to be the best route? Why? Are there circumstances in which an alternate route is better? When is that the case?
  • Have your students pair off to discuss their responses for a minute or two.
  • Ask some of the pairs to share and summarize their journal entries. 

Guided Activity (40 min)

Good Algorithms and Better Algorithms [5 min]

Briefly discuss with your class the topic: what properties make for a good algorithm? What makes one algorithm better than another? Properties you may want to discuss if your students do not volunteer them:

  • correctness
  • ease of understanding
  • elegance (clarity, simplicity, and inventiveness)
  • efficiency

A good analogy is purchasing a car, where people are concerned about:

  • safety
  • ease of handling
  • style
  • fuel efficiency

Today's session will address the topic of efficiency.

Algorithmic Efficiency [10 min]

Introduce the concept of algorithmic efficiency to your students by asking them if any can describe what algorithmic efficiency is, or what it means for an algorithm to be efficient. Briefly describe efficiency as how well an algorithm uses two resources, time and space (stored memory), to solve a problem. Some topics you may wish to discuss include:

  • Two algorithms may both solve the same problem correctly, but with different degrees of efficiency.
  • An algorithm that is maximally efficient will minimize the resources it uses.
  • Algorithms typically face a space-time tradeoff, where they either use more memory to run faster or take more time but use less memory.
    • When you use a map, you are using more storage resources to go along your route more quickly
  • An example of an algorithm that trades space for time (stores more in memory to operate faster) is a lookup table.
    • A real-world example of a lookup table is numbered valet parking. The valet gives the customer a number and goes to park the customer's vehicle in the parking space with that number. When the customer or valet needs to find the vehicle again, instead of having to search through all the spaces, all they need is the remembered (stored) number to go directly to that parking space.
  • Most of the time, we are more interested in computational efficiency, or time usage of an algorithm.
  • There is also an efficiency in developing algorithms. Programming languages provide abstractions to build on such as variables, expressions, procedures and libraries. By being aware of the many levels of abstraction in developing a program you can effectively apply the resources available to solve a problem efficiently in terms of the quality of the solution and the time spent by the programming team.

Computational Complexity [10 min]

Teacher note: This topic is more advanced, so you may wish to go more in depth or move on to the activity, as appropriate for your students.

A central idea of algorithms is that some algorithms will take more and more time as the size of their input increases. Time is not measured in seconds but rather the number of computational steps needed for the algorithm to finish operation on a given input. Great algorithms grow linearly, at the same rate as their input, meaning the time it takes to finish is directly proportional to the size of the problem they are solving (amount of input data). For instance, an algorithm that takes 10 steps for an input of size 10 and 1000 steps for an input of size 1000 is said to be linear in its input. However, most algorithms take longer as their input gets larger. For instance, an algorithm that takes only 25 steps for an input of size 5 may take 100 steps for an input of size 10, 10000 steps for an input of size 100, and one million steps for a size of only 1000 (it is taking quadratically more time as the input gets larger).

When we analyze algorithms, we often talk about the algorithm's computational complexity, which is the order of magnitude of the algorithm's running time. We almost always discuss the worst case complexity, since that is a bound on the resources required.

If an algorithm finishes with the same number of steps regardless of the size of its input, it is called constant time, which is O(1) in mathematical form (read aloud as "big-oh one"). Constant time algorithms are the fastest in terms of computational efficiency, and any algorithm that takes a constant number of steps is considered O(1). An algorithm that takes 10 steps for an input of size 10 and also takes 10 steps for an input of size 1000 is likely O(1). However, very, very few algorithms are constant time because most algorithms necessarily take longer as the size of their input increases.

An algorithm that can finish by looking at each piece of its input only once is called linear time or linear order, and is written mathematically as O(n), where n stands for "the size of the input." An algorithm that takes 10 steps for an input of size 10 and also takes 1000 steps for an input of size 1000 is likely O(n). Very few algorithms are linear order, especially if they must compare pieces in their input, such as sorting algorithms. The best sorting algorithms are somewhere between linear time and quadratic polynomial time, written as O(n2), where n2 stands for "the size of the input, squared." Any algorithm that is O(n2) typically must compare each piece of its input with every other piece of input at least once. An algorithm that takes 100 steps for input of size 10 and a million steps for input of size 1000 is likely O(n2).

Most sorting algorithms are of an order between O(n) and O(n2) known as linearithmic time, written as O(n log n), where log is the logarithmic function. In fact, O(n log n) is the fastest possible order for a comparison-based sorting algorithm. It is impossible for such algorithms to be O(n) since they must make at least some comparisons of their input data. 

Comparing Sorting Algorithms [15 min]

Using the simulation tools at http://www.sorting-algorithms.com/, students will investigate, compare, and contrast sorting algorithms. Notice the grid in the center of the page. Each column is a particular sorting algorithm, and each row is an ordering of horizontal bars (either random, nearly sorted, reversed order, or few unique). Each algorithm will sort the bars in a given cell from top to bottom in increasing order by length.

Ask your students to interact with the website by clicking the green start icons and observing how long it takes each algorithm to sort its bars relative to the other algorithms.

Some questions to have them discuss or record in their journal could include:

  • Find the row for "Random" and click the icon above it to see each algorithm sort a randomly ordered set of bars.
  • Which algorithms are going slow on average? Which ones are fastest?
  • Experiment with larger input sizes by clicking a number for Problem Size near the bottom of the page (30, 40, or 50). Click the icon above Random again. What changes do you notice in the speeds of algorithms? Why are the slow algorithms taking even longer than before? Would you ever want to use them?
  • Set the problem size back to 20.
  • Find the column for "Bubble" (bubble sort) and click the icon above it to see it run on each of the ordering types. Which one finishes first? Why do you think that is?
  • Find the row for "Nearly Sorted" and click the icon above it to see all the algorithms run on nearly sorted input data. Which algorithms finish first? What algorithm is slow on random data but finishes quickly on nearly sorted data? Why do you think it does so?
  • Which algorithms do you think are O(n2)?

Make sure your students understand that the size and order of input data can affect how long an algorithm takes. You should direct or help your students discover that bubble sort is a slow sorting algorithm that can be fairly fast for nearly sorted data. You may wish to discuss that bubble sort is O(n2) in the worst case, explaining why it takes so long for large input, but is O(n) in the best case, which is when input is already (or nearly) sorted. In contrast, selection sort is O(n2) in both the worst and best cases, and merge sort is O(n log n) in both the worst and best cases. In general, most sorting algorithms that we would want to use are O(n log n), since O(n2) is usually too slow. You may also want to mention that bubble sort is considered one of the most inefficient sorting algorithms and that quick sort’s worst performance is on already sorted data, so some quick sort implementations shuffle the inputs before sorting to avoid that situation.

Wrapup (5 min)

Watch one or more of the available movie clips that compare the performance of sorting algorithms:

Suggested list of videos (Many more are available):

Session 2

Getting Started (5 min)

Journal: Remind your students about the sorting algorithms from the previous session and have them answer the following questions:

  • What are some ways in which one algorithm can be better than another, besides efficiency?
  • Explain what algorithmic efficiency is by discussing two different sorting algorithms.

Guided Activity: Empirical Analysis (40 min)

Introduction [5 min]

The students will measure and analyze the effect of sorting set size on execution time for a given sorting algorithm using Python code. Using the timedsorts.py file in the lesson resources folder as a basis, the students will perform an experimental analysis to compare sorting algorithms by timing them on input data of different sizees. They will hypothesize, design and code their experiment, collect results, and write a report for homework.

The sorting functions available in the Python code include: quick sort, merge sort, selection sort, insertion sort, and bubble sort. For advanced students or classes may, you may wish to have them implement additional sorting algorithms. 

The sample code includes helper functions to generate random data, to load data from a file, and to time sorting functions on the data. Example code for invoking these functions is included at the end of the file. You can remove this example code before sharing it with your students if you wish to emphasize the programming and critical thinking required to do this project.

Each student (or pair or group) needs their own copy of the Python code to modify for their experiments.

Experimental Design [15 min]

Students will compare sorting algorithms by timing them with Python code on input data of various sizes. Have your students (individually or in pairs) make a hypothesis about what will happen as the size of data input increases, answering the following questions:

  • How can you determine which sorting algorithm is most efficient and which is least effiicient?
  • What sorting algorithm do you think is most efficient, and which is least efficient?
  • What do you hypothesize will happen to the time as the size of the data input increases?
  • What is the independent variable in this experiment?
  • What is the dependent variable?

Have your students write out a description of the steps they will take to perform the experiment.

Data Collection [20 min]

Have students modify their Python sorting code to implement the experimental steps they outlined. Students must:

  • Time their sorting routines with different size sets of items to sort (e.g., 5000, 10000, 25000, 50000). Sample data files are available in the lesson resources folder, but students should use the provided helper function to generate arrays of random data, too.
  • Record (write down) the size of each input array, the name of the sorting function, and the resulting time it took to sort the data for each algorithm/data combination they test.
  • Discuss the results with another student or group. What patterns can be seen in the relationship between the amount of data and the time to run the program?

The data collection should be completed by the end of class, but students will continue to work on this activity by writing a report describing their results.

Wrapup (5 min)

Assign as homework to write a short report about the findings, making sure to:

  • Write your hypothesis. How do your findings reflect your hypothesis?
  • What algorithm or algorithms are most efficient? Why?
  • What algorithm is least efficient? Why?
  • What values did you use for your independent variable?
  • Present the data you collected in a table and in a graph.
  • What conclusions can you draw about sorting algorithms?
  • Explain why algorithmic efficiency is important by discussing another problem (not sorting) where a correct but inefficient algorithm is unusable at larger input sizes. 
  • Pick two sorting algorithms you tested. Write a paragraph for each describing how it works, and one paragraph comparing the two algorithms explaining which is more efficient and why (you can do research and look at the Python code to figure out the reasons).

Students must complete a short research report on their sorting algorithm research procedure, results, and analysis of the results.


Options for Differentiated Instruction

The teacher may decide to have the students choose how they want to organize the empirical analysis effort.  Alternatively, scaffolding with a worksheet or checklist could be used to guide the students through the data collection and analysis tasks.


Evidence of Learning

Formative Assessment

The following "Checks for Understanding" could be used to guide the students towards the three learning objectives:

Objective: SWBAT identify families of correct algorithms that have different efficiencies in their problem solving approach.

  1. Students will pair-share what makes a good choice for the route taken to get from point A to point B.
  2. Students will compare algorithms and explain why and when some are better than others in terms of efficiency.
  3. Students will be able to identify and rank order the least efficient sorting algorithms in the simulations.

Objective: SWBAT demonstrate logical reasoning and metrics is used to describe an algorithm’s efficiency.

  1. Predict:  Students will have seen sorting algorithms implemented as folk dances.  Students will predict -- for their algorithm -- how adding additional dancers would increase the dance completion time.

Objective: SWBAT to perform empirical analysis of sorting algorithms by running the algorithms on different inputs.

  1. Students will work in pairs to collect data on sorting execution times.  The pairs will share their results with other groups to check for patterns before they write up their results.

Summative Assessment

Students will complete a short research report on their sorting algorithm research procedure, results, and analysis of the results.

Lesson Summary

Summary: Students are introduced to the theory of computation, computability, the halting problem, and advanced algorithms. In particular, they will learn about heuristic search used by artificial intelligence (AI) programs to play games.

Objective: 

Students will be able to:

  • define computation and some basic ideas of the theory of computation
  • discuss computability and understand there are some things computers cannot solve
  • explain the Halting Problem
  • identify some advanced search algorithms
  • understand how AI programs represent games with game trees
  • understand how AI programs use uninformed and heuristic search algorithms to play games

Overview:

Session 1

  1. Getting Started (10 min)
  2. Guided Activity (35 min)
    1. Inverse Operations Activity [10 min]
    2. Computation [10 min]
    3. Computability [15 min]
  3. Wrap Up (5 min) - Think-Pair-Share 

Session 2

  1. Getting Started (5 min)
  2. Guided Activity (45 min)
    1. Search and Game Trees [15 min]
    2. Game-Playing AI [10 min]
    3. Types of Heuristic Search [10 min]
    4. Playing a Game with Heuristic Search [10 min]

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.

Common Core Math:

  • N-RN.3: Use properties of rational and irrational numbers.
  • F-BF.1-2: Build a function that models a relationship between two quantities
  • F-BF.3-5: Build new functions from existing functions
  • S-IC.1-2: Understand and evaluate random processes underlying statistical experiments
  • S-CP.6-9: Use the rules of probability to compute probabilities of compound events in a uniform probability model
  • S-MD.5-7: Use probability to evaluate outcomes of decisions

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure

NGSS Practices:

  • 2. Developing and using models
  • 6. Constructing explanations (for science) and designing solutions (engineering)

Essential Questions

  • How can computational models and simulations help generate new understanding and knowledge?
  • What considerations and trade-offs arise in the computational manipulation of data?
  • What kinds of problems are easy, what kinds are difficult, and what kinds are impossible to solve algorithmically?
  • How are algorithms evaluated?

Teacher Resources

Student computer usage for this lesson is: required

Links to videos and online tools as indicated in the lesson plan.

 Alternative instruction could include the Towers of Hanoi problem and discuss the algorithm for solving it. Some demonstrations are available here:

Lesson Plan

Session 1

Getting Started (10 min)

Think-Pair-Share: In pairs, think about and try to answer each of the following questions:

  • Given y = 7x + 4 and x=3 what are the steps to find y?
  • Given y = 7x + 4 and y=3 what are the steps to find x?
  • Factor 81,927,497 and 81,927,499. Can you figure out the steps?
  • Multiply 431 x 433 x 439. What are the steps?

Note: just give them a few minutes to try the factoring, but round them up to continue and discuss: which operations were much harder to perform than their inverse? Can you just invert the steps, and why or why not?

Guided Activities (35 min)

Inverse Operations Activity [10 min]

  1. Convey the following concepts:
    1. Inverse arithmetic operations
      • add/subtract                     [x + 7 – 7 = x – 7 + 7 = x] ;
      • multiply/divide                  [x * 7 / 7 = x / 7 * 7 = x] ;
      • ex /ln(x)                              [ln(ex) = eln(x) = x];
    2. Some arithmetic operations are harder to do then their inverse operations -- as the students did during the warm-up.
      • Cubing a number versus finding the cube root of the result.
        • Find the cube of 12
        • Find the cube root of 5832
      • Multiplying numbers to form a product versus factoring the product.
    3. The same can be true with algorithms.
      • It is much easier to scramble a Rubik’s cube with a few moves than it is to solve a scrambled Rubik’s cube with a few moves.  [Optional -- Have the students discover this using a Rubik's cube or an online simulated cube].

Make a connection to the previous lesson by comparing these to sorting algorithms, where some are speedy and efficient like Merge sort and Quick sort, and others are unusably slow, like Bubble sort. Highlight the difference that different problems have different lower bounds on optimal solutions, and that some problems like integer factorization have solutions but take too long to be solved in a practical way.

Computation [10 min]

Discuss the definition of computation (in a theoretical sense) with your students. Computation is input plus processing to get output. A computer is one system that is a "model of computation" since it takes input, processes it, and produces output.

Another model of computation is called a Turing machine, named after Alan Turing (one of the most famous computer scientists). A Turing machine is a theoretical entity that has a tape of symbols (a line of 0s and 1s), a head that can read only one symbol at a time, and an internal state that can change based on instructions as the head reads symbols. Turing and a mathematician called Alonzo Church are responsible for the "Church-Turing" thesis, which says that a Turing machine can compute anything that a digital computer can. This is a fundamental idea of the theory of computation, and has the implication that anything one computer is capable of doing is possible to be computed by another, given enough resources (time and memory). 

Computability [15 min]

Now discuss the idea of computability with your students. Ask your students to answer or think-pair-share: are there things it is impossible for a computer to compute? The most classic "undecidable" (non-computable) question is called the Halting Problem. The Halting Problem is: make a program that can tell if another program will halt (terminate at some point eventually) or will loop forever and never end.

The Halting Problem is impossible for a computer to compute, which you can prove (informally) by paradox. Suppose you did have a program that solved the Halting Problem, called HALT(X), which takes the code for some program X as input and says "yes" if X terminates or "no" if X loops forever. Then you could write a new program that uses HALT inside it, which we will call PARADOX(X). First PARADOX(X) will run HALT(X) and if the result is no, PARADOX will halt, but if the result is yes, then PARADOX will loop forever. But here is the problem: what if we use the code for PARADOX as the input to PARADOX, running PARADOX(PARADOX)? If it says that PARADOX halts, then PARADOX runs forever, and if it says PARADOX runs forever, then PARADOX halts. This problem is a paradox and does not make sense because the premise, that a program called HALT could exist, must be wrong! Therefore, the Halting Problem is impossible for a computer to solve.

Video explanation with optional student simulation

  • Alonzo Church, an American, and Alan Turing, from the UK, independently proved in the 1930s – before computers actually existed – that there are some problems that computers will never be able to solve. View: The Halting Problem at: https://www.youtube.com/watch?v=92WHN-pAFCs  [Optional 7:52]  Have groups of students act out the machines in the video to determine whether they understand the basics of the proof.

Wrap Up (5 min)

Think-Pair-Share:

  • Ask your students to think about the following algorithms, pair off, and reorder them based on worst-case computational complexity, with the fastest ones first and the slower (or undecidable) ones last:
    • Bubble Sort
    • Factoring large integers
    • Merge Sort
    • Binary Search
    • Taking attendance
    • The Halting Problem
  • Discuss the orderings that a few groups came up with. Advanced groups could also try to guess the computational complexity:
    • Binary Search, O(log n)
    • Taking attendance, O(n) since you just read off the list in order
    • Merge Sort, O(n log n)
    • Bubble Sort, O(n2)
    • Factoring large integers, O(en), approximately exponential depending on the algorithm
    • The Halting Problem, undecidable

Session 2

Getting Started (5 min)

This session concerns advanced algorithms, in particular heuristic search, which is commonly used in artificial intelligence. Refresh your students' minds on the definitions of computation, computability, and undecidable problems. Additionally, mention the properties we consider when we compare algorithms:

  • correctness
  • ease of understanding
  • elegance and style
  • time/space efficiency

Guided Activity (45 min)

Search and Game Trees [15 min]

Introduce the idea of heuristic search, which is a class of algorithms used in many artificial intelligence programs. A heuristic is something that is used to find a good solution in a reasonable time, and a heuristic search algorithm is an algorithm that uses heuristics to determine how to search through some space.

A great way to introduce heuristic search is first to discuss game trees. A game tree is a structure that is used to represent the "space" of a game that an algorithm wants to search through.

Think of a game like chess: you make a move, the opponent makes a move, and the process continues until the ending conditions have been met (one player in checkmate or stalemate). A game tree is a mathematical structure used by AI and heuristic search algorithms to model the moves made in a chess game. At any turn, we can make a "tree" by drawing the root node as representing the current state of the board and drawing one branch under it for every possible move. In Tic-Tac-Toe, if you are the starting player, then the root node represents a blank board, and there will be nine branches, one for each possible move (each space where you could place your mark). Following a branch in the game tree takes you to a new node that represents the configuration of the game that results from having taken that move. In Tic-Tac-Toe, if I am the first player and place my X in the center space, I have "followed" that branch down the tree to a new node that represents the board with an X in the center space. The opponent then uses this node as the root of their game tree, and has a branch for each of their possible moves.

Think-Pair-Share: Have your students pair off and play a game of Tic-Tac-Toe and try to draw the game tree as they play it, drawing the nodes for each move they made and every potential branch from those nodes. Bring them back into discussion and ask them what if they had to draw out every node followed down every branch? Now ask them to imagine the game tree for chess, which has 20 possible moves on the first turn, 400 on the second, and many, many more as the game goes on. How can an artificially intelligent program learn to play chess when there are so many (too many) options? Chess actually has around 35100 nodes in its tree and 1040 legal states.

Game-Playing AI [10 min]

Heuristic search on game trees is one way AI programs are able to play games like chess. How good are computer game players?

Typically games modelled with game trees are 2-person games, players alternate moves, and they are zero-sum (meaning one player's loss is the other's gain). More complicated elements in such games may have include: hidden information (like other players' hands), chance (dice), or multiple players.

Playing a Game with Heuristic Search [10 min]

How does an AI program use heuristic search to play a game? Typically in these steps:

  • consider all moves that are possible for the current turn
  • compute what the new positions and configuration of the board (the "state") for each of those moves
  • evaluate each state using some scoring function to determine which is better
    • for example, taking an opponent's piece is probably going to be evaluated more highly than simply moving a pawn
  • make the move that results in the best evaluated state
  • wait for your opponent to play, repeat

The key problems are:

  • representing the state of the board
  • generating the resulting states from every move
  • evaluating the value of the resulting states

For evaluation, some function is typically coded or learned over time.

  • For Tic-Tac-Toe, for board state n, an evaluation function could be:
    • f(n) = [# of 3-lengths open for me] - [# of 3-lengths open for you], where a 3-length is a complete row, column, or diagonal
  • Alan Turing's function for chess with board state n:
    • f(n) = w(n)/b(n) where w(n) is the sum of the point value of white's pieces on the board at state n, and b(n) is the sum of black's pieces. The point values are those commonly used by professional chess players, pawn is 1 point, the queen is 9 points.

Types of Heuristic Search [10 min]

Refer to the "Advanced Algorithms" slides in the lesson resources folder for examples of uninformed search. For an activity, you may want to create a game tree for Tic-Tac-Toe and have your students walk through how each of the following algorithms would operate over it.

Uninformed Search are algorithms that work without a heuristic, using no information about the likely "direction" of the goal node. Algorithms include:

  • depth-first search
    • starting at the root of the game tree, pick one branch and examine the node at the end of it, then pick one branch of that node and examine the even deeper node (hence, "depth-first") until you reach the end of the game, then go back one node, pick one of its branches, explore until you reach the end of the game, and so on
    • this search is unpractical for games with many moves that may go on indefinitely
  • breadth-first search
    • starting at the root of the game tree, called A. It has n branches leading to child nodes each called B1, B2, and on to Bn, for some n nodes. Examine each of these children in order before moving onto the children of B1, examining each of those in order, then examining the child nodes of B2 then those of B3, and so on.
    • this search is unpractical for games with many or variable numbers of moves per turn

For any games with variety and complexity, certainly for chess and even checkers, uninformed search is simply too slow because it is exhaustive. This problem is another example, like with sorting, where the efficiency of our solution matters a great deal. To get programs to play games, we need them to be efficient and intelligent about the number and quality of moves they consider. 

Informed Search algorithms each follow some heuristic that uses information about the game to determine smart directions to explore. Examples include:

  • best-first search ("greedy")
    • at every turn, take the branch leading to the node with the greatest value from the evaluation function 
    • the problem here is when there is delayed reward since this "greedy" approach lacks any ability to look ahead. For instance, if there are two moves available, one that is great and another that is just decent, it will always pick the great move even if a winning move could be made the turn after the decent one. 
  • A* ("a star")
    • estimates the goal node and picks nodes based on the least cost. It follows a best-first strategy but also factors in the distance it has traveled from the original root node.
  • Your GPS device! In order to figure out the best, fastest route to your destination, your GPS will search through the possible roads you can take intelligently by factoring in things such as the span and capacity of the road, the traffic, and potentially even the time of day. 

Advanced classes may wish to discuss local search algorithms, such as hill-climbing and genetic algorithms (in the "Advanced Algorithms" slides in the lesson folder).

Minimax

Thinking about game trees again, we want to select the branch that takes us to a node with the maximum evaluated state. But there is a catch: the opponent gets to make moves, too. That is, every other branch in our game tree is the opponent's turn. How does the AI program account for the other player?

Perhaps most logically, the way AI programs do so is to assume the other player will play optimally. Just as the AI will take the branch that leads to the state with the greatest evaluation, it assumes the other player takes the branch leading to the state that will maximize their position. In other words, the AI searches through their game tree by following the branch with the maximum value on their turn, and following the branch with the minimum value on the opponent's turn. This algorithm is called minimax and is the basis of nearly all AI that play 2-person zero-sum games.


Options for Differentiated Instruction

For the Halting Problem proof, it is important that students can translate the solution that is on the video into a representation that makes (some) sense to them.  Acting out the inputs and outputs of the set of machines is an approach worth trying.


Evidence of Learning

Formative Assessment

The following "Checks for Understanding" could be used to guide the students towards the three learning objectives.

Objective: Students will identify some Advanced Algorithms that Exploit Inverse Operations Efficiency.

  1. Pairs of students will be asked to list pairs of basic arithmetic inverse functions.
  2. The class will develop a composite list of inverse functions found by the student pairs.  Note: many of these pairs share the same key on their graphing calculators.
  3. Students will factor composite numbers and create the same composite numbers from their prime factorization.  They will log the relative effort in their journals.

Objective: Students will identify some Advanced Algorithmic Techniques.

  1. Students will find examples from earlier modules where the algorithms used techniques of heuristics, randomness, probability, etc.  This could be a good group review of prior topics.

Objective: SWBAT discuss at least one example of a computing problems that is unsolvable

  1. Students will either describe the proof of Turing's Halting problem using models in a way that is similar to that used in the lesson video or they wil build a similar physical model using students as the machines.

Summative Assessment

Students will be able to summarize -- in their own words or with simple models -- the proof of the Halting Problem.

Students will be able to identify the sensitivity of cryptography to the difficulty of factoring large numbers.

Lesson Summary

Summary

Students will define, design and implement a programming project: a miniature version of the Create Performance Task. They will create presentations and share with groups the projects they developed and how their project used abstractions.

Outcomes

  • Students will complete a miniature version of the Create Performance Task.

Overview

Session 1:

  1. Presentation  (5 min) Students are introduced to the Create Task.

  2. Activity (15 min) Students select a small programming project to model the Create Task.

  3. Activity (10 min) Students identify an algorithm to use in their program and share within tabe groups.

  4. Activity (10 min) Students identify an an abstraction to use in their program.

  5. Wrap Up (5 min) Students share the algorithms and abstractions they will use with the class.

 

Session 2:

1. Journal (2 min) - What is your plan for today for the development of your project? What abstractions do you plan on using in your project?

2. Activity (43 min) - Students complete implementing their projects.

3. Journal (5 min) - Reflection. What abstractions did you use in your project?

Session 3:

1. Getting Started (5 min) - Students individually respond to three prompts about their projects.

2. Activity (20 min) - Students prepare one minute presentations of their projects.

3. Presentations (15 min) - Students present their project to table groups.

4. Wrap Up (5 min) - Students create exit slips with any questions about the Create Task.

Learning Objectives

CSP Objectives

Key Concepts

Students practice choosing a project and planning how to implement it in a fixed time frame. 

Students have just two days to plan and implement a project.  Since these will be small projects, students may need help using algorithms and data abstraction. Since an algorithm is a list of steps that comes to a conclusion, if students develop pseudocode for their projects they can refer to the pseudocode as their algorithm. 

Students may receive most of the credit from an incomplete project if the project demonstrates the required components.

For this practice task, teachers may want to provide program stubs.  Stubs could include suggested functions. 

 


Essential Questions

  • How are algorithms implemented and executed on computers and computational devices?
  • How do computer programs implement algorithms?
  • How does abstraction make the development of computer programs possible?

Teacher Resources

Lesson Plan

Session 1:  Planning Day

Present an overview of the Create Task.

Explain that students will have 12 hours to complete the Create Task later in the course and they will three 50-minute sessions for this practice.  The actual Create Task will have a suggested collaborative component and be larger in scope.

Discuss the following guidelines for the full project and the practice project we will be doing.

Full Create Task Guidelines

Three components to create:

  • Program
  • Report
  • Video

General:

One project - individual with collaboration in stages

12 hours of classroom time

Project must use functional and data abstraction.

 

Report: Written responses  (response to all prompts combined must not exceed 750 words, exclusive of the Program Code.):

a. Provide a written response or audio narration in your video that:  Identifies the programming language and identifies the purpose of your program.   

b. Describe the incremental and iterative development process of your program

c. Describe how a selected algorithm functions.

d. Explain how an abstraction you developed helped manage complexity

 

Practice Create Task Guidelines

For this practice task, students will complete simpler project and a one-minute presentation about it, rather than a video and a report.

Students work individually to select projects.

 

After completing the project, students will create a one-minute presentation about it.  Presentation should address the following.

a.  Identify the programming language and the purpose of your program.   

b. Describe the incremental and iterative development process of your program

c. Describe how a selected algorithm functions.

d. Explain how an abstraction you developed  helped manage complexity

The presentation must address at least points a and b of the above and c or d.

Projects are chosen by the student.  If they wish, their projects may be based on the following labs from How to Think Like a Computer Scientist.

Labs

 

Students select a project and share their ideas with partners. 

After collaborating with partners, students submit to their teacher a brief description of the project describing its most important features and how it will work.

Students identify an algorithm and an abstraction to use in their projects.  The algorithm should be written as pseudocode and then shared with their partners.

Students should discuss in groups what abstraction they chose and how they think it would be helpful.

 

Session 2: Implementation Day

Warm up (2 min)

Students complete a brief journal entry describing:

  • Their plan for today in the development of the project.
  • What abstractions they will be using in the project.

Work Time (43 min)

Students work to implement and test projects. Teachers may evaluate student performance based on student journal entries and their observations of their effort in implementing the project.

 

Closing (5 min)

Students reflect on their project and making journal entry of how they used abstraction in the project.

 

Day 3: Presentation Day

Warmup (5 min)

Students begin by individually responding to these prompts about their project:

b.    describe the purpose, how your program code works and the most important features and algorithms

d.    describe the development process

e.    explain an abstraction and how it helped manage complexity

 

Presentation Preparation (20 min)

Students prepare one-minute presentation about their projects including their responses to prompts b, d and e. 

 

Presentations (15 min)

Students present their project to table groups. Time the presentations so that they do not exceed 1 minute. Students share with table groups what they like about the project, what they learned and any questions they have.

 

Closing (5 min)

Students create exit slips with any questions they have about the Create Task after viewing and discussing the presentations.

 

 


Evidence of Learning

Formative Assessment

For the practice task, project descriptions and pseudocode for each proposed project should be assessed.  Assessment can be done by collaborative partners first.  If partners have concerns, they should be brought to the teacher.  If student projects are too big or too small in scope, teachers should provide feedback.


Summative Assessment

The project should be scored using the latest rubric provided by the College Board. 

The latest rubric (updated as of June 2016) is in the lesson folder.  

Lesson Summary

Summary

EarSketch teaches computer science through music composition and remixing. No prior knowledge of either computer science or music is needed. Students can express their own unique style. EarSketch also lends itself well to student collaboration as well as a discussion on proprietary ownership.

EarSketch is a web-based application, so there is no software to install. You need a current version of Chrome, Safari, Firefox, or Edge running on Mac, Windows, Linux, a ChromeBook, or a tablet with an attached keyboard. You also need headphones or speakers.

EarSketch consists of two components:

  1. A free online curriculum that teaches programming concepts using Python while teaching music composition and remixing.
  2. A free online software toolset, which contains a code editor to write and test Python code and a Digital Audio Workstation (DAW) to actually play the music.

 Students create an account to get Cloud storage for their files.

  • This curriculum does not ask students to post anything on this or on any public web site.   
  • No downloads or installs are needed other than current web browsers.   EarSketch runs inside a recent web browser Chrome, Firefox, Safari or Microsoft Edge. (Internet Explorer < 12 is not supported.)
  • Students need ear buds or headphones for these lessons.

Outcomes

  • Students will understand the basics of music including beat, measure, track, and effects.  
  • Students will use the Python programming language to create and remix their own music.  
  • Students will apply Python programming concepts - iteration, user-defined functions, debugging
  • Students will apply Python programming concepts - list creation, access, modification and traversal

Optionally from Section 3.

  • Students will use the Python programming language to create and remix their own music including effects and musical forms
  • Students will use the Python programming language to create and remix their own music including randomness and stochastic composition
  • Students will explore sonification -a way to use non-speech audio to convey information, or in other words, turning data into sound.
  • Students use Python to enable the computer to analyze audio.
  • Students will implement recursive Python programs

 Overview

The Lesson is divided into three sections.  

Section 1 Getting Started with EarSketch  is anticipated to take about 5-6 sessions.

  1. Programming for Personal Expression
  2. Program Design and Functions
  3. Project 1
  4. Copyright and Correctness
  5. Section 1 Assessment

Section 2 is anticipated to take about 5 sessions to complete these EarSketch units.

  1. Reusing Code
  2. Strings and Debugging
  3. Project 2
  4. Conditionals and Data Strucutres
  5. Section 2 Assessment

 

 

Section 3 is optional and is anticipated to also take about 5-6 sessions to complete these Earsketch units.

Each session will have the following elements.

  1. Getting Started: (5 min)
  2. Guided Activities (40 min)
  3. Wrap Up (5 min)

Sources

EarSketch curriculum is available at https://earsketch.gatech.edu/earsketch2/#. The EarSketch curriculum and teaching materials are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.

 

 

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • 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:

  • F-IF.1-3: Understand the concept of a function and use function notation
  • F-BF.1-2: Build a function that models a relationship between two quantities
  • F-LE.5: Interpret expressions for functions in terms of the situation they model

Common Core ELA:

  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.9 - Synthesize information from a range of sources
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.4 - Produce clear and coherent writing in which the development, organization, and style are appropriate to task, purpose, and audience
  • WHST 12.6 - Use technology, including the Internet, to produce, publish, and update writing products

NGSS Practices:

  • 2. Developing and using models
  • 3. Planning and carrying out investigations
  • 4. Analyzing and interpreting data
  • 5. Using mathematics and computational thinking

NGSS Content:

  • HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering.

Essential Questions

  • How can a creative development process affect the creation of computational artifacts?
  • How can computing and the use of computational tools foster creative expression?
  • How can computing extend traditional forms of human expression and experience?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • 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 does abstraction make the development of computer programs possible?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?
  • How does computing enable innovation?
  • What are some potential beneficial and harmful effects of computing?
  • How do economic, social, and cultural contexts influence innovation and the use of computing?

Teacher Resources

Student computer usage for this lesson is: required

Students will need earbuds or headphones for these lessons.

EarSketch consists of three components:

The software toolset component includes the EarSketch code editor and digital audio workstation environment to write code and make music. It runs inside a web browser with the latest versions of Chrome, FireFox, or Safari. Internet Explorer is not supported and the digital audio workstation will not load. You must use a browser that supports Web Audio.  (Internet Explorer 12 plans to include support for Web Audio.)

Teachers should review the first two modules of the student curriculum to learn the components of EarSketch: Unit 1 (Getting Started) and Unit 2 (Effects and Beats).

Next, teachers should access the teacher curriculum, which is designed to help computer science teachers with little or no music knowledge begin teaching EarSketch in their classrooms. It presents music concepts, rhythms, pattern and variety, and effects as they relate to music programming in EarSketch. 

Finally, teachers should complete the student curriculum to get an idea of what students will be learning and doing.

Lesson Plan

Section 1 Introduction to EarSketch

Session 1

Getting Started (5 min)

Journal Prompt: What are possible advantages there are to creating and mixing music on a computer?

Responses should be collected from each student and used to create a word cloud. Project the following four benefits to programming music and ask, "Are any of these missing?"

  1. You can automate repetitive, tedious tasks.
  2. You can experiment with music more easily.
  3. You can roll the dice. (Introducing randomization into music.)
  4. You can turn data into music and interpret data in a musical way.

Students should select one of these four points and record throughts and observations as to their meanings.

Guided Activities (40 min)

Direct students to Unit 1: Getting Started with EarSketch (http://earsketch.gatech.edu/uncategorized/unit-1).

Within the first unit, they should explore the section 1.1. Introduction to the DAW (Digital Audio Workstations) (http://earsketch.gatech.edu/uncategorized/unit-1#chap11). Students should research the following definitions and procedures, then share them with a partner.

Definitions

  1. DAW
  2. measure
  3. track

Procedures

  1. How does one create, manage and play (run) an EarSketch script?
  2. How does one select and play tracks in the digital audio workstation in EarSketch?

 

Especially important is the process of creating, opening, running, editing, and saving EarSketch python scripts both on the EarSketch cloud as well as in the classroom. Once students have completed this task, demonstrate the following sections for them:

   1.4 Running a Script

   1.5 Adding Comments

   1.6 The DAW in Detail

   1.8 Sections of an EarSketch Script

   1.9 Creating a New Script

1.10 Composing In EarSketch

 

2  All programs process data, even those being developed for personal expression.  Demonstrate interactively the use of Python variables to store and retrieve data and to express values. Introduce student to the concept of abstraction and have students identify at least one detail that is hidden by each of data representation they review. 

   2.1 Rhythm

   2.2 Data Types

   2.3 Functions

   2.4 Numbers

   2.5 Variables

        2.6 Constants

Wrap Up (5 min)

It is important that students know how to use the curriculum and the online development environment.  Students should reflect on the process of creating, saving and retieving program in EarSketch.

  1. Which questions have been answered?
  2. Which questions remain?
  3. What new questions arose?

Assignment

Assignment 1.1

This assignment can be found within the curriculum resources at Unit 6 > Lesson 1 > EarSketch Units > Unit 1.

 

Session 2

Getting Started (5 min)

Journal: Students should open their Assigment 1.1 (homework from the previous section) and discuss what they learned while completing it with their elbow partners. They should record in their journals two observations made either in the previous session or during the completion of the assignment. Any questions remaining after these discussions should be shared by students.

Guided Activities (40 min)

Beats, Effects and Tempo 

Program Design and Functions

Students work in pairs through the 8 sections below and add any questions they have to those posted during the getting started session.

Debugging and Documenting

Effects in EarSketch: setEffect

Tempo and Pitch

Students complete Quiz 2.1.

Wrap Up (5 min)

Identify and responding to questions students have shared.  Use other studetns as a resource to answer as many questions as possible.

Assignment

Distribute and assign Assignment 2.2.   

 

Session 3

Getting Started (5 min)

Collect: Assignments 1.1 and 2.2

Journal: Students should discuss with their elbow partners the first two assignments, reflecting on the lessons learned and identifying any questions that are lingering. Unresolved questions should be posted on the board.

Guided Activities (40 min)

Some time should be used to respond to questions students posted at the beginning of the session. If questions are regarding upcoming material answer these during the next activity.

Students should work together to complete a  project for units 1 through 3. This project can be found under Unit 6 Resources > Lesson 01 - Earsketch > Projects > Project Unit 1-3_1.docx. The final product should be one working program per group.

 

Wrap Up (5 min)

Students should get into pairs and complete Quiz 3.1.  Collect an exit slip from students of any questions they need help with. Collect the quiz. 

Assignment

Students should complete Assignment 3.1 for the next session.

 

Session 4

Getting Started (5 min)

Journal: Students should discuss with elbow partners the lessons they learned from session 3 (including the assignment and quiz). Any unresolved questions should be posted to the board.

Guided Activities (40 min)

Before continuing, any questions regarding last session's formative quiz or assignment 3.1 should be answered.

Students again work in pairs to review Program Design and Functions using the following elements in the EarSketch curriculum.

Debugging and Documenting

   3.1 What is Debugging?

   3.2 Using the Console

   3.3 Documenting Code

   3.4 Common Errors

Effects in EarSketch: setEffect

4.1 Using Effects in EarSketch

Tempo and Pitch

   6.1 Tempo

   6.2 Pitch

   6.3 Transition Strategies

Wrap Up (5 min)

Students should reflect on how they benefited from cooperating with one another as partners and how they might beneifit from collaboration on the next project.

Assignment

Students should prepare for the section 1 exam using the assignments, quizzes and EarSketch units 1-3 as resources.

 

Session 5 (Section 1 Assessment)

Getting Started (5 min)

Students should upload their collaborative projects from session 4, including the .wav output of the music they created.

Guided Activities (40 min)

Students will take the section 1 test (units 1-3). The test to be administered can be found at the following location: Unit 6 Resources > Lesson 01 - Earsketch > Section Tests > Unit 1-3 Test.docx.

Time permitting, discuss the current music sharing sight and the ethical issues surrounding public sites. If students require more time to complete their collaborative projects, some could be given here as well.

Wrap Up (5 min)

Going foward, host a version of March Musical Madness. Hold a single elimination tournament to select the class musical section 1 champion.  If going on to sections two and three, consider doing just one round of the contest.  Each week allow pairs to enter their best product either from something newly created or modified.

 

Section 2 Dynamic Music Generation 

Session 6

Getting Started (5 mins)

Students should brainstorm lessons learned from the first section. They will be working in pairs throughout this entire section so this is a good time to also discuss standards for collaboration and cooperation. Partners/ work groups should be specified here. Notes gathered during this section, along with the EarSketch API documentation, will be allowed for the section 2 exam. 

Guided Activities (40 mins)

Student work in pairs through the Reusing Code sections below and post any questions they have.

Looping

   9.1 The For-Loop

   9.2 Components of a For-Loop

   9.3 Example Loop

   9.4 Following Control Flow

   9.5 Adding Effects with Loops

   9.6 Automating Effects with Loops

Musical Form and Custom Functions

10.1 Sections and Form

10.2 A-B-A Form

10.3 Custom Functions

10.4 Return Statements

 

Wrap Up (5 mins)

Using students as a resource whenever possible, answer any questions students have identified.

Working in pairs, students should complete Quiz 4. This quiz can be found under resources at the following location:  Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 4. 

Assignment

Optional - Time permitting have stuend seletc a project and collaborate in its development.

With partner/work group, select an assignments from the following list (these assignments can be found under the following: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 4).

Assignment 4.1 

Assignment 4.2

Assignment 4.3

Assignment 4.4

Assignment 4.5

 

Session 7

Getting Started (5 mins)

Assess student progress from the previous session. Student working groups should identify questions or concerns. It is crucial that major concerns are addressed as soon as possible.

Guided Activites (40 min)

Student work in pairs through theStrings and Making Custom Beats: makeBeat sections below and post any questions they have. 

12.1 Strings

12.2 Beat Patterns with Strings

12.3 makeBeat()

13.1 String Concatenation

Debugging Logic

15.1 Printing to the Console

15.2 The Debugging Process

15.3 Common Errors

 

 

Wrap Up (5 min)

Using students as a resource whenever possible, answer any questions students have identified.

Working in pairs, students should complete Quiz 5.1. This quiz can be found under resources at the following location:  Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 5.

 

Assignment

Select and assign one of the following to assignments (these assignments can be found under the following: Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 5):

Assignment 5.1

Assignment 5.2

 

Session 8

Getting Started (5 mins)

Assess student progress from the previous session. Student working groups should identify questions or concerns, making sure to share all concerns pertaining covered material before the following session.

Guided Activities (40 mins)

Students should work together to complete a  project for units 1 through 3. This project can be found under Unit 6 Resources > Lesson 01 - Earsketch > Projects > Project Unit 4-6_1.docx. The final product should be one working program per group.

Time permitting students shoul work individually on  assignment 6.1. This assignment can be found within the curriculum resources at Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 6.

 

Wrap Up (5 min)

Students should identify questions or concerns and share those that they think are most important, supplementing their notes with important comments.

Assignment

Formative Assessment (15 min)

Working in pairs, students should complete Quiz 6.1. This quiz can be found under resources at the following location:  Unit 6 Resources > Lesson 01 - EarSketch > EarSketch Units > Unit 6.

 

 

Session 9

Getting Started (5 mins)

Assess student progress from the previous session. Student working groups should identify questions or concerns, making sure to share all concerns pertaining covered material before the following session.

Guided Activites (45 mins)

Have your students select and complete (in pairs) one of the following two projects. These projects can be found under Unit 6 Resources > Lesson 01 - EarSketch > Projects:

Project Unit 4-6_1.docx

Project Unit 4-6_2.docx

Assignment

Students should consolidate their notes and prepare for the section 2 exam next session. REMINDER: It is an open note exam.

 

Session 10

Getting Started (5 mins)

Journal: Have students reflect on the ethical concerns raised by digital media innovations such as EarSketch. In their journals, they should write down a specific ethical issue associated with the use of EarSketch. They should also point out one additional piece of online technology that raises digital media related ethical concerns.

Guided Activity (40 mins)

Distribute and administer the section 2 exam. This exam can be found at the following location: Unit 6 Resources > Lesson 01 - EarSketch > Section Tests > Unit 4-6 Test.docx.

Wrap Up (5 mins)

Host a version of March Musical Madness. Hold a single elimination tournament to select the class musical section 2 champion. If going on to section three, consider doing just one round of the contest. Each week allow pairs to enter their best product. It can be derived from the in-class work or be a completely new, out-of-class creation.

 

Section 3 Teaching Computers to Listen (Optional)

Section 3 is optional and is anticipated to also take about 5 sessions to complete these EarSketch units.  Students should be working very independently during this unit in prepartion for the Create Task.

11 EarSketch Unit 7: Teaching Computers [1 session]

12 EarSketch Unit 9: Recursion [1 session]

13 Project 3 [2 sessions]

14 Summative Assessment

Session 11:

Getting Started

 

Guided Activities

Unit 7: Teaching Computers

 

Formative Assessment

Quiz 7.1.docx

Assignment:

7.1

Wrap Up:

In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.

 

Session 12:

Getting Started

Assess student progress from Session 11.  Groups identify questions or concerns and share any items of concern before day 2 of this section.

 

Guided Activities

Unit 9: Recursion

Formative Assessment

Quiz 9.1

Assignment:

9.1

Wrap Up:

In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.

 

 

Session 13 and 14:

Getting Started

Assess student progress from Session 12.  Groups identify questions or concerns and share any items of concern before days 3 and 4 of this section. 

 

Guided Activities

Project Unit 7-9_1.docx

Project Unit 7-9_2.docx

 

Assignment:

Prepare for Section 3 exam.

Wrap Up:

In pairs. then study groups students identify questions or concerns and share those they think are most important and supplement their notes with important comments.

 

 Session 15:

Guided Activities

Unit 7-9 Test.docx

Wrap Up:

Host a version of March Musical Madness.  Hold a single elimination tournament to select the class musical Section 2 champion.  If going on to three consider doing just one round of the contest.  Each week allow pairs to enter their best product either from somethnnewly created or modified.

Assignment:

None

 


Evidence of Learning

Formative Assessment

Section 1:  

Quiz 1.4-1, 1.4.2, 2.1-1, 2.1.2, 3.1, 3,2 and 3.3

 

Section 1:  

Quiz 4, 5.1 and 6.1

 

Section 1:  

Quiz 7.1 and 9.1

 


Summative Assessment

Section 1:  

Project Unit 1-3_1 and Unit 1-3 Test 

 

Section 2:

Project Unit 4-6_1 and Unit 4-6 Test

 

Section 3:

Project Unit 7-9_1 and Unit 7-9 Test 

Lesson Summary

Summary

In this lesson, students will be formally introduced to data visualization using Bokeh: an interactive data visualization library in Python. They will go through a guided tour of how to use this library, and then will complete a fun activity that involves gathering data from their classmates for the purposes of visualization.  

Outcomes

Students will learn why data visualization is important.

Students will be able to meaningfully visualize data they collect. 

Overview

Session 1 (Line/Bar Graphs):

  • Getting Started - Data acquisition (5 Minutes)
  • Guided Tour - iPython notebook / Powerpoint - (15 minutes)
  • Activity - Plotting data (30 minutes)
  • Wrap Up - Exit slip (5 minutes)

Session 2 (High-level charts):

  • Getting Started - Data acquisition (5 Minutes)
  • Guided Tour - iPython notebook / Powerpoint (15 minutes)
  • Activity - Plotting with high-level charts (30 minutes)
  • Wrap Up - Exit slip (5 minutes)

Learning Objectives

CSP Objectives

Teacher Resources

Student computer usage for this lesson is: required

  • Power Point presentations: "session1.pptx," "session2.pptx"
  • iPython notebooks: "BokehTutorialLesson1_a.ipynb"

Lesson Plan

Session 1

Getting Started (5 minutes)

Come up with 4-5 questions that make sense when visualized with a line graph or bar graph, such as:

  • When do you usually do your homework? 
  • What time do you wake up in the morning on a weekday?
  • What time do you wake up in the morning on the weekend?
  • etc.

Enlist the help of your students in coming up with the questions. Present all questions at the start of this lesson, and solicit answers to each question from each student. These answers will be used later in the lesson, so make sure to collect them in a table-like format such as ".csv"

It is reccommended that you create a Google Form to collect answers to these questions with. You could then ask your entire school to fill out the survey, and have even more data to visualize! 

Guided Tour (15 Minutes)

Use the existing iPython Notebook to introduce Bokeh. Explain data visualization. Have the students follow along as you show them how Bokeh line plotting works, have them attempt the exercise at the end of the notebook. 

Activity (30 Minutes)

Using the data that was collected at the beginning of class, determine the best way to plot the information collected at the beginning of class. Then, plot it! See if you can come up with cool trends by plotting data on the same chart, etc.

Exit Ticket (5 minutes)

Simple exit slip, ask the students what data visualization is, why it is important, how to construct a line graph in Bokeh, etc.

 

Session 2

Getting Started (5 minutes)

Gather data in a similar fashion as the last session. Ask questions of your class / school that make for interesting visualizations. 

Guided Tour (15 Minutes)

Use the powerpoint provided to briefly discuss the high-level charts available in Bokeh.

Activity (30 Minutes)

Have the students use any of the high-level charts to plot the data that was collected in the warm-up.

Exit Ticket (5 minutes)

Ask a simple question about any of the plotting mechanisms covered.  


Lesson Summary

Summary 

Continuing the focus on data analysis from Unit Five, students will use the browser-based Dataquest learning environment (http://www.dataquest.io) and supplementary materials to explore more ways in which Python can be used to analyze data. For the first week, students will explore Dataquest through the browser-based "missions" on the website. Each lesson begins with a warm-up/journal entry, and students then spend the rest of the time working through the missions at their own pace.  For the second part of the lesson, students will design and implement their own data analysis project in order to prepare them to complete a data-focused Create Performance task.

Outcomes

  • Students will understand how to design a data analysis project
  • Students will have the tools to analyze data in Python
  • Students will have practice reading and understanding datasets

Overview

Week One: Learning Dataquest

  1. Getting Started (5 - 10 min)
  2. Independent Study (40 - 45 min)

Week Two: Data Analysis Project

  1. Students Plan and Implement Data Analysis Program

 

Learning Objectives

CSP Objectives

Teacher Resources

Student computer usage for this lesson is: required

DataQuest.io website: https://www.dataquest.io/learn

Week One Materials: Unit 6 Resources -> DataQuest.io -> Week One Lesson Materials -> Mission #

Week Two Materials:

Datasets: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> Datasets

Sample Project: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> Sample Project

Project Rubric: Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials -> "Data Analysis Project Rubric"

(Quizzes for Week One and Week Two are in the corresponding teacher-only resource folders)

 

 

Lesson Plan

Week One: Learning Dataquest

Note: all worksheets and quizzes can be found in the teacher-only resource folder, Unit Six -> DataQuest.io -> Week One Lesson Materials -> Mission #

Directions for working in Dataquest.io

  1. Each student will first need to create an account on Dataquest.io. This is free, and will help them to keep track of their progress.
  2. Each mission comes with a worksheet with required sections to complete. Students are encouraged to fill out as much as possible. The non-required sections are introductions to basic coding tools. Some students may want to do these if they need a refresher on the concepts. 
    • Note: As of now, sections cannot be skipped on the website. This limitation may change in the future.
  3. Once they have completed the worksheet for the mission, students will use the notes on their worksheets to complete:
    1. concept quiz to test their understanding of the data science concepts.
    2. coding quiz to test their understanding of the Python concepts.

Quizzes should be done in class, and should take a minimum of 10-20 minutes to complete. It is advisable to not give a quiz out in the last ten minutes of class. If there are only a few minutes left, the student can use the time to add to their notes.

If a student fails one of the quizzes, they may be given the chance to go back and add to their worksheet before attempting the quiz again. (Multiple versions of all coding quizzes are available.)

There are a total of four Missions for the Introduction to Python track. Students are only required to do the first three. The fourth Mission has worksheets/quizzes for those students who get to it, and can be counted as extra credit/normal grade at the teacher’s discretion. Two additional optional missions are available: one on data visualization, and one on working with statistics.

Getting Started (5 - 10 min)

Day 1

Show the first two minutes of the introductory video in Mission 1 on the Dataquest.io website. Students will discuss their reactions and thoughts about Data Science.

Day 2

Pull up d3js.org on the projector. This is the webpage for a data visualization library in Javascript that has many great examples of ways to make connections from data. You can explore by clicking on one of the tiles on the front page. Explore the D3 front page with the class and discuss reactions.

Day 3

This warm-up time is used for class discussion on progress through the missions. You can use this time to gauge the students' comfort with Python concepts by having students vote with their heads down. If enough students are having trouble, you may want to have a separate review session during the class.

Day 4

This warm-up time can be used for reviewing a Python concept (such as Dictionaries) or looking at a current news article involving data analysis (any article about a topic of interest to the students that uses statistics would be appropriate). Students should think-pair-share on additional ways in which data could be used.

Day 5

Students should do a show of hands to see where everyone is in the missions. The class should have a general discussion about progress.

 

Week Two: Data Analysis Project

Note: All materials for this section can be found in Unit 6 Resources -> Dataquest.io - > Week Two Project Datasets and Materials

Directions: 

For this week, students will be pairing up to create and implement a data analysis program of their own design.

  • Teachers start out the first day by presenting the PowerPoint "Project Introduction," which goes through the steps to creating a data analysis project. Teachers then review the "Data Analysis Project Directions" document.
  • The class splits up into groups of two (with up to one group of three) and each group chooses a dataset to work with. It is preferable if each group chooses a different dataset.

For the rest of the week, students should work on their projects in their groups. At the end, teachers can optionally have them present their PowerPoints to the class, exchange presentations in pairs, or merely turn everything in.


Evidence of Learning

Formative Assessment

  • Week One quizzes
  • Check for understanding at the beginning of each day of week one.

Summative Assessment

Week two project.

Lesson Summary

Pre-lesson preparation

The second session is a programming activity and requires using NetLogo (a tutorial is in the Unit 4 Lesson on Hypothesis Testing with NetLogo) or using Python with Bokeh (for more advanced students).

Summary

Students will be introduced to the topic of diversity and computational problems, learn about and discuss implications of the proliferation of algorithms in society, and reflect on how the quality of input data and small, sometimes unintended biases can lead to low quality solutions.

Outcomes

  • Students will consider how diversity leads to better solutions.
  • Students will discuss the proliferation of algorithms in society.
  • Students will learn about some applications of artificial intelligence and machine learning algorithms.
  • Students will explore a computational simulation of bias.
  • Students will understand how small changes in input parameters can affect output quality and variety.
  • Students will program an agent-based model from social science theory.

Overview

Session 1

  1. Getting Started (5 min)
    • Artificial intelligence algorithms in daily life?
  2. Discussion (10 min)
    • Algorithms, Input Data, and Diversity
  3. Guided Activty (25 min)
    • Parable of the Polygons
  4. Wrap-up (10 min)

Session 2

  1. Getting Started (5 min)
    • Algorithms, Diversity, and Solutions
  2. Programming Activity (40 min)
    • Make your own Parable of the Polygons
  3. Wrap-up (5 min)

Learning Objectives

CSP Objectives

Math Common Core Practice:

  • MP3: Construct viable arguments and critique the reasoning of others.

Common Core ELA:

  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.6 - Analyze the author's purpose in providing an explanation, describing a procedure
  • RST 12.9 - Synthesize information from a range of sources

NGSS Practices:

  • 2. Developing and using models
  • 7. Engaging in argument from evidence

NGSS Content:

  • HS-ETS1-1. Analyze a major global challenge to specify qualitative and quantitative criteria and constraints for solutions that account for societal needs and wants.
  • HS-ETS1-4. Use a computer simulation to model the impact of proposed solutions to a complex real-world problem with numerous criteria and constraints on interactions within and between systems relevant to the problem.

Teacher Resources

Student computer usage for this lesson is: required

Supplementary articles:

Lesson Plan

Session 1

Getting Started (5 min)

Think-Pair-Share: Artificial intelligence algorithms in daily life?

Ask your students to list discuss what artificial intelligence algorithms they think affect them in daily life and how they are affected. How would it be different if those algorithms did not recognize them or treated them inappropriately? If an algorithm makes the wrong judgement about them, what would they do, who could they go to for help? It is OK if students are unsure about the answers as it leads into the following discussion.

Discussion: Algorithms, Input Data, and Diversity (10 min)

Algorithms have become prominent and common in daily life. In particular, algorithms that use artificial intelligence (AI) or a technique called machine learning are employed to make decisions that affect us, sometimes in ways we aren't aware of and cannot control. For example, machine learning is used by Google, Facebook, Flickr, among other companies to detect faces in photographs, apply labels, or automatically tag images with people they recognize. In general, these algorithms are trained on input data (such as images of people), and are improved iteratively using statistical methods until they learn how to categorize, differentiate, and reach a correct answer. Another example of companies using AI is in personalized marketing or recommendation systems. For instance, Amazon tailors the products they suggest based on an algorithm trained on similar customers' purchase history. Or a company like Netflix will recommend movies to users who rate similar movies similarly.

At the heart of these algorithms is the fact that their solutions all depend on the initial parameters and input data used to train them. What happens when those parameters and data are not sufficiently diverse? Small changes in those parameters, oversights in the training data, implementer bias (both intended and not), and missing distributions or categories can all negatively prejudice algorithms. All this is important to keep in mind as algorithms start determining aspects of our lives and there is less or no control over the input and decisions they make about and for us.

A 2016 article in the New York Times (http://www.nytimes.com/2016/06/26/opinion/sunday/artificial-intelligences-white-guy-problem.html?_r=0) highlights an example problem where lack of diversity leads to lower quality solutions. In particular, various AI and machine learning algorithms were developed by and calibrated on too limited a population, leading to insulting and significantly bad results, such as not recognizing people with dark skin tones or tagging them inappropriately. Examples where diversity may greatly influence the quality and real-world implications of algorithms include:

Guided Activity (25 min)

Parable of the Polygons

A hands-on example of how initial parameters, subtle biases, and lack of diversity can greatly affect an algorithm's execution is in the "Parable of the Polygons" (http://ncase.me/polygons/). The Parable of the Polygon is a simulation based on the mathematical model of how segregated communities may arise from small differences preferences, based on the theory of Thomas Schelling, an economist and game theorist who received the Nobel Prize for Economics in 2005.

Guide students through the website and let them explore dragging polygons, changing settings, and see how they can influence (it is best for them to follow along individually or in groups on their own computer).

An alternative version of the final sandbox with three polygon shapes is also available here: http://ncase.me/polygons-pentagons/play/automatic/automatic_sandbox_frame.html

Wrap-up (10 min)

Journal or Homework

Have your students continue to explore the Parable of the Polygons website and answer the following questions using the sandbox at the bottom of the website:

  • What settings where the ratio of polygon populations are the same lead to the greatest segregation? Why do you think that is?
  • What settings where the ratio of polygon populations are the same lead to the least segregation? Why is that?
  • What settings where polygons still have room to move lead to the algorithm being unable to find a solution (it does not terminate)? Why is that?
  • Answer the same three questions above using the three-polygon version here: http://ncase.me/polygons-pentagons/play/automatic/automatic_sandbox_frame.html

Session 2

Getting Started (5 Min)

Think-Pair-Share: Algorithms, Diversity, and Solutions [5 min]

  • Have students consider one or more of the following questions:
    • How can an algorithm be affected by diversity (such as in its input data)?
    • What does it mean for input or training data to be diverse?
    • Can you think of examples where diversity, or the lack of diversity, affects the quality of an algorithm's solution?
    • Can you think of algorithms that benefit from diverse data?

Programming Activity (40 Min)

Two options: guided programming exploration with NetLogo, or more involved Python programming project for advanced students

Option 1: Using NetLogo

  • If you have not already used NetLogo in the classroom, you can follow the instructions for downloading and setting up NetLogo in the Unit 4 Lesson "Hypothesis Testing with Simulations in NetLogo"
  • Open up NetLogo and go to File->Models Library, then under the Sample Models folder, open the Social Science folder and load the Segregation model
  • For information about the model, read the sections in the Info tab
  • Have the students experiment with the settings and see what differences and similarities it has to the Parable of the Polygons website
  • For the remainder of the activity, have the students make some meaningful changes to the code of the simulation (in the Code tab) and write a short response stating what they did and how their parameters
  • Some suggestions include:
    • Add more types of agents to the model (hint, add another color to the line "set color one-of [red green]")
    • Change the sliders to match the Parable of the Polygons slider (agent count based on ratios, ability to have <50% agents)
  • Finally, a more developed model is included in the NetLogo models library

Option 2: Using Python with Bokeh (for advanced students)

Have students re-create the Parable of the Polygons themselves in Python, time with at least four types of polygon shape/colors. The source code for the Parable website is hosted on GitHub here: https://github.com/ncase/polygons/blob/gh-pages/play/automatic/automatic.js It is in JavaScript, but it serves as a good pseudocode basis. Alternatively, students could use the NetLogo code from Option 1 as another reference in creating their simulation.

Wrap-up (5 Min)

Journal: Have your students reflect and list 5 examples or ways in which diverse input makes for better solutions.


Lesson Summary

Pre-lesson Preparation

Students should have practice in the following areas before starting on the Create Performance Task:

  • Designing a program using multiple-level algorithms (at different levels of abstraction) and data abstractions, and being able to identify how they are used.
  • Creating a program with the following features:
    • Mathematical expressions.
    • Logical expressions.
    • Sequence, selection, and iteration.
    • Functions.
  • Creating required submission documents, including:
    • Creating a video (narration optional) that illustrates the functionality of a program.
    • Saving program code as a PDF.
    • Marking segments of the code using ovals and squares to signify algorithms and the use of abstraction.

Summary

In the Create Performance Task (CPT), students bring ideas to life through software development. The CPT requires students to design and iteratively develop a program. The College Board encourages but does not require students to collaborate with a partner, and once students begin the development of the CPT, they may receive help only from the collaborative partner. While not requiring it, this lesson supports a collaborative effort. Even if collaboration is used, each student must independently complete a significant level of planning, designing, and developing the program. Students will have 12 hours of class time to complete, and submit:

  • A video of the program running.
  • Written responses about the program and the development process.
  • All of their program code.

The program must:

  1. Produce a result that cannot easily be accomplished without computing tools. 
  2. Demonstrate a variety of capabilities.
  3. Include an algorithm that integrates other algorithms and mathematical or logical concepts.
  4. Use abstraction (functions or data structures) to manage the complexity of the program.
  5. Implement several language features and use the following concepts:
    • Mathematical expressions such as numbers, variables, and arithmetic operators.
    • Logical expressions using Boolean operators.
    • Decision or selection branches.
    • Iteration or looping.
    • Collections such as strings or lists.

This lesson plan provides a schedule for 15 50-minute sessions to meet the 12-hour in-class minimum required by the College Board. 

Outcomes

  • Students will design and implement a program to pursue a topic of personal interest or to solve a problem.
  • Students will use functional or data abstraction to manage program complexity.
  • Students will be able to implement a multiple-level algorithm.
  • Students will be able to implement sequence, selection, iteration, and functions using arithmetic and logical expressions.

Overview

Session 1: Identify performance task requirements and choose a topic to develop.

Session 2: Design the program, identifying both multiple -evel algorithms and multiple abstractions used in their design. Students work with collaborative partners to verify the adequacy of their designs to meet the performance task requirements.

Session 3: Program Development: Code top-level functions.

Session 4: Program Development: Code second-level functions.

Session 5: Program Development Checkpoint: Assess progress and revise design and development strategies.

Session 6: Program Development:  Continue revised function development.

Session 7: Program Development:  Complete function development.

Session 8: Program Development Checkpoint: Assess progress and make final revision to development strategies.

Session 9: Program Development:  Make final revisions to program code.

Session 10: Program Development: Complete program and plan video.

Session 11: Video Development:  Record and optionally narrate video.

Session 12: Video Development:  Assess video and make final revisions.

Session 13: Written Responses:  Respond to prompts 2a, 2b, and 2c.

Session 14: Written Responses:  Respond to prompts 2d and 2e.

Session 15: CPT Submission:  Submit and share projects.

Learning Objectives

CSP Objectives

Essential Questions

  • How does abstraction help us in writing programs, creating computational artifacts and solving problems?
  • How are algorithms implemented and executed on computers and computational devices?
  • 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 does abstraction make the development of computer programs possible?
  • How do people develop and test computer programs?
  • Which mathematical and logical concepts are fundamental to computer programming?

Teacher Resources

In the Lesson Resources Folder (Teacher Only)

  • Create Performance Task Rubric as of November 2015

In the Lesson Resources Folder (Public)

  • Preliminary Topic Selection Guide
  • Create Performance Task Rubric Assignment
  • Create Performance Task Directions as of November 2015
  • Daily Progress Report
  • Collaboration Agreement
  • Program Development Plan

Possible Screen Capture/Recording Tool

VLC Media Player

Dowload: http://www.videolan.org/vlc/index.html

Instructions for screen recording: http://www.wikihow.com/Screen-Capture-to-File-Using-VLC

Lesson Plan

Teacher Guidelines for Involvement

Prior to administration of the Performance Task and during the planning stages:

Teachers MAY: 

  • Influence student selection of topics.
  • Clarify directions for completion of the performance tasks.
  • Remind students of submission requirements.
  • Guide student understanding of the CPT.
  • Designate collaborative partners
  • Influence student selection of program topics (however, teachers may not require selection of particular topics for students).
  • Assist students in creating a program development schedule.

Teachers MAY NOT:

  • Choose topics for students.
  • Develop, write, revise, or amend student work.
  • Provide boilerplates.
  • Allow students to submit practice tasks as actual performance tasks.
  • Suggest or evaluate student responses to prompts.

During the Performance Task 

Teachers MAY: 

  • Resolve hardware/technical problems.
  • Manage student progress throughout the task.
  • Assist students in managing their progress, including making assessments of student efforts and fulfillment of the development schedule
  • Clarify directions for the performance tasks.
  • Remind students of submission requirements.

Teachers MAY NOT:

  • Write, revise, or amend student work.
  • Provide boilerplates.
  • Allow students to submit practice tasks as actual performance tasks.
  • Provide programming support while students are developing the performance task. Only code written by the student will be scored.
  • Provide feedback to students regarding the quality of the work until after the task has been finally submitted to the College Board. 

Session 1

Objectives:

  • Introduce the Create Performance Task (CPT).
  • Students develop understanding of the CPT requirements.
  • Students assess both the performance task requirements and its evaluation rubric.
  • Students are designated partners and do preliminary topic selection.

Tell students: Today you will begin the Create Performance Task. In the CPT, you will be developing a program of your choice. The goal of this task is for you to develop a program to solve a problem, create an innovation, or express a personal interest.

Exercise 1: CPT Overview

Provide students with a copy of the Create Performance Task (AP Computer Science Principles Performance Task Create–Applications from Ideas) description from the College Board.

  1. Students read the Overview section on page 1 and answer the three questions below. (2 min)
    1. How is the program topic determined?
    2. What three products are you to produce?
    3. How much time will you have to complete and submit the required products?
  2. After students share with elbow partners, address any questions students have to this point. (3 min)
  3. Students read the General Requirements section beginning on page 1 and answer the questions below. (5 min)
    1. What recommendation regarding collaboration is made?
    2. What are the five general requirements for this performance task?
    3. What does the video need to display?
    4. What are the written responses about?

Exercise 2: Program Requirements

  1. Students read Program Requirements section. (1 min)
  2. They then answer the questions below: (5 min)
    1. What must the program demonstrate?
    2. What must the program implement?
    3. What must the program produce?
    4. What five elements from the second sentence should the program contain?
    5. What must the program demonstrate about each of the following?
      • Mathematical and logical concepts
      • Implementation of an algorithm
      • Use of abstractions
  3. After students share with elbow partners, address any questions that students have to this point. (3 min)

Exercise 3: Submission Requirements

  1. Read part 1 of the Submission Requirements about the video and answer the following. (2 min)
    1. What three requirements does the video have to meet?
  2. Read the first paragraph of part 2 about the Written Responses and answer the following. (2 min)
    1. What format is to be used for the written responses?
    2. How are the responses to be labeled?
    3. What is the maximum length of all written response combined? 

Exercise 4: Written Response

Jigsaw the Program Purpose and Development section. Assign each of the written responses a-e to one of five groups. Each group answers the questions below. (2 min)

Written Response a

  1. What must the response identify?
  2. What must the response explain?

  3. What is the approximate word limit?

Written Response b

  1. What is focused on in this description?
  2. In addition to describing the difficulties, what must be described about them?

  3. At least one of the difficulties must have been addressed in what manner?

  4. What is the approximate word limit?

Written Response c

  1. What portion of the program code is to be copied in this section?
  2. What is to be described?

  3. What is the approximate word limit?

Written Response d

  1. What portion of the program code is to be copied in this section?
  2. What is to be explained?

  3. What is the approximate word limit?

Written Response e

  1. What is contained in this response?
  2. What is to be marked with an oval?

  3. What is to be marked with a rectangle?

  4. When are comments are required? 

Each group shares its results. (5 min)

Exercise 5:  

Assign students collaborative partners. Distribute Preliminary Topic Selection Guide. Students decide on the topic they will address and the form of collaboration they will use. (10 min) 

Homework:

Distribute the CPT rubric and CPT Rubric Assignment.

Session 2

Objectives:

  • Students commit to a program topic.
  • Students plan collaboration strategy.
  • Students design the program with multiple-level algorithms and multiple abstractions.
  • Students develop a formal schedule for program implementation.

Tell students:

Today we have four goals. We will commit to a program topic and develop a collaboration strategy, a program design, and an implementation schedule. 

NOTE: Students may only receive help from the collaborative partner from this point on until the CPT documents are ready to be submitted. Teachers collect the topics, strategies, and designs in order to help manage student progress, but may not provide any feedback to students on content. 

Exercise 1: Program Topic (5 min)

Meet with collaborative partners and discuss the CPT rubric assignment. Each individual submits programming topic and purpose. 

Exercise 2: Collaboration Strategy (10 min)

Each partner group submits a plan for collaboration. 

Exercise 3: Program Design (20 min)

Each individual submits a program design. 

Exercise 4: Program Development Schedule (10 min)

Each individual submits a daily program development schedule. 

Session 3: Program Development Day 1

Tell students: Today will be our first program design day.

Exercise: Students implement their program (48 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 4: Program Development Day 2 

Tell students: Today will be our second program design day.

Exercise: Students implement their program (48 min) 

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 5: First Checkpoint

Tell students: Today we will evaluate program development progress and revise our program development schedules as needed. We will also discuss with partners the difficulties we encountered and the strategies we used to address them.

Note: Partners collaborating in their program development in the first session stages will switch to individual development at this point.

Exercise 1: Review Program Development Progress (5 min)

Each individual submits a revised schedule of program development, 

Exercise 2: Managing Difficulties (5 min)

Partners discuss the major difficulties they have faced to this point and the strategies they used to overcome them. 

Exercise 3: Students implement their program (38 min) 

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min) 

 

Session 6: Program Development Day 3

Exercise 1: Examining the Rubric (5 min)

Tell students: Before starting our research we will examine the rubric that readers will use when scoring your computational artifact and written response.

Exercise 2: Students implement their program (43 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 7: Program Development Day 4

Exercise: Students implement their program (48 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 8: Second Checkpoint

Tell students:  Today we will evaluate program development progress and revise a program development schedule as needed. We will also once again discuss with partners the difficulties we encountered and the strategies we used to address them.

Note: Partners collaborating in their program development in the second session stages will switch to individual development at this point.

Exercise 1: Review Program Development Progress (5 min)

Each individual submits a revised schedule of program development.

Exercise 2: Managing Difficulties (5 min)

Partners discuss the major difficulties they have faced to this point and the strategies they used to overcome them.

Exercise 3: Students implement their program (38 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 9: Program Development Day 5

Tell students: Today will be our next to last program development day.

Exercise: Students implement their program (48 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 10: Program Development Day 6

 Tell students: Today will be our last program development day.

Exercise: Students implement their program (48 min)

At the end of class:

  • Students complete a daily progress report.
  • Teachers will collect the progress report in order to monitor progress but may not provide any feedback to students on content. (2 min)

Session 11: Video Development Day 1

This session is the first of two scheduled to develop the video. It's possible to create the video in a single day, so if students need more time to work on their program implementation, it may be done here with video planning assigned as homework.

Tell students: Today will be our first of two days dedicated to producing the CPT video.

Exercise 1: Select Program Features (3 min)

Each individual selects features that demonstrate the programs overall purpose. 

Exercise 2: Storyboard (10 min)

Students plan how to show the purpose of the program and the running of related features. 

Exercise 3: Record clips for video (25 min)

Students record required clips. 

Exercise 4: Video Clip Assessment (10 min)

Collaborative partners assess the video clips and recommend any additional clips or changes to existing clips.

Session 12: Video Development Day 2

Exercise 1: Video Completion (25 min)

Students complete the CPT video in mp4, wmv, avi or mov format.

Exercise 2: Draft Written Response 2a (25 min)

Students write the explanation of the programming language used, their program's purpose, and what the video illustrates.

Session 13: Written Responses: Program Development

Exercise: Students write responses to prompts 2b and 2c (50 min)

Session 14: Written Responses 2d and 2e

Exercise: Students write responses to prompts 2d and 2e (50 min)

Session 15: CPT Submission 

Objectives:

  • Submit all CPT documents by uploading them to the performance task submission web site.
  • Present all computational innovations to the class.
  • Complete a post task reflection.

Tell students: There are three goals for this session.

  • Submit all three CPT documents by uploading them to the performance task submission web site.
  • Present all programs to the class.
  • Complete a post task reflection.

Exercise 1: Upload CPT documents (15 min)

Students upload both files. 

Exercise 2: Create Program Presentations (15 min)

Students set up workstations to show their video and to give access to their program, Students perform a gallery walk to review the programs. 

Exercise 3: Post Task Reflection (15 min)

Students respond to these two questions.

  • What did you learn about application development?
  • What advice would you give to students in next year's class?

Note: Teachers may want to record students making these comments to be used to introduce the project next year.


Evidence of Learning

Formative Assessment

Students may not receive assistance regarding the content of their CPT documents until after they have been submitted to the College Board.


Summative Assessment

Students may not receive assistance regarding the content of their CPT documents until after they have been submitted to the College Board. Once the documents have been submitted teachers should use the CPT rubric to assess performance task documents.

To convert the rubric score to a percentage teachers may want to use the following scale:

Program Development Progress: 50 pts

Over 10 days, students submit a project assessment, a program development plan and 6 daily progress reports and complete 2 program checkpoints.  Weighted as 5 points for each day:

0 points no progress

1 point sporadic or minimal progress

2 points inconsistent progress

5 points consistent progress

Video Progress: 10 pts

5 points for each day

0 points no progress

1 point sporadic or minimal progress

2 points inconsistent progress

5 points consistent progress

Written Report Progress: 10 pts

5 points for each day

0 points no progress

1 point sporadic progress

2 points inconsistent progress

5 points consistent progress

Rubric score 30 pts