River Dell Regional School District Computer Programming with Python Curriculum 2015 Mr. Patrick Fletcher Superintendent River Dell Regional Schools Ms. Lorraine Brooks Principal River Dell High School Mr. Richard Freedman Principal River Dell Middle School Mr. William Feldman Assistant Superintendent of Curriculum and Instruction Computer Programming Committee Jen Ali Chin Chu Donald Seok
TABLE OF CONTENTS INTRODUCTION Page 3 UNIT ONE Page 4 UNIT TWO Page 8 UNIT THREE Page 11 UNIT FOUR Page 15 UNIT FIVE Page 19 UNIT SIX Page 23 UNIT SEVEN Page 27 UNIT EIGHT Page 31 River Dell Regional School District 2
INTRODUCTION The skills for computer programmers combine those used in mathematics, engineering, and natural science. Like mathematicians, computer programmers use formal languages to denote ideas, more specifically, computations. Like engineers, they design things, assembling components into systems and evaluating tradeoffs among alternatives. Like scientists, they observe the behavior of complex systems, form hypothesizes, and test predictions. The most important skill computer programmers use, however, is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. In essence, the process of learning to program provides students with the opportunity to practice problem-solving skills. The programming language used in this course is Python that is a language similar to C, C++, and Java, which are all examples of high level languages that are easier to program, take less time to write, are shorter and easier to read, and can run off of different kinds of machines with few or no modifications. Almost all programs are written in one of these languages and the knowledge learned about programming in one is transferable to others. Students taking the course will learn how the role of computers in society gained significance over time. Students will develop an understanding of how computers function and the interface between hardware and software that allows computers to achieve what it was programmed for. Students will learn a new language, computer language, and discover the similarities and differences to natural languages that we use in every day communication. They will become familiar with the process of writing programs which includes making mistakes, finding the errors, and correcting them. They will understand how logic is embedded in computer programming by writing conditional statements, repetition structures, and functions. They will learn how to integrate prepackaged modules into their programs to expand the capabilities of the programs that they write. Ultimately, the goal of the course is for students to develop fluency in computer language so they can command computers to do a desired task. Students will be given many opportunities throughout the course to apply their knowledge of programming to solve different problems that increase in complexity as their knowledge of computer programming increases. River Dell Regional School District 3
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT ONE: INTRODUCTION TO COMPUTING 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 4
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS A computer performs tasks based on the interaction between hardware and software. ENDURING UNDERSTANDINGS Computers play an important role in society and the role of computers becomes increasingly more significant as we move into the future River Dell Regional School District 5
ASSESSMENT Teacher Observation Paper and pencil quizzes/tests Research paper ESSENTIAL QUESTIONS 1. What important roles do computers play in society? 2. What are the limitations of computers? 3. What time period did greater reliance on the computer begin and what factors precipitated it? 4. How has the role of computers advanced over time? 5. What is the difference between hardware and software? 6. What are the main components of a computer and what are their functions? 7. What is a program? 8. What is the relationship between hardware and software? LESSON OBJECTIVES Students will be able to: Understand the important roles computers play in society Identify the limitations of computers Understand that the reliance of computers elevated during World War ll Recognize that advances like the internet and smartphones reflect advancement of computer technology and the role of computers in society Identify the main components of a computer and understand each of their functions Understand that the software controls the interworking of the hardware to achieve desired outcomes Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity River Dell Regional School District 6
LEARNING ACTIVITIES Direct instruction Research Group problem solving activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 7
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT TWO: INTRODUCTION TO CODING 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 8
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Coding is the language that is used to command computers to perform desired tasks. ENDURING UNDERSTANDINGS The formal language of coding is very restrictive and leaves no margin for error. River Dell Regional School District 9
ASSESSMENTS Teacher Observation Paper and pencil quizzes/tests ESSENTIAL QUESTIONS 1. What is coding? 2. What are the differences between a natural language and a formal language 3. What is a binary system composed of? 4. How do you convert a real number system to a binary system? 5. What is debugging? LESSON OBJECTIVES Students will be able to: Understand that coding is a language to communicate with computers Understand that natural languages are languages that people speak and formal languages are languages that are designed by people for specific applications that have strict rules about syntax Understand that the binary system is composed of ones and zeros Convert between a real number system and a binary system Understand that debugging is the process of finding and removing program errors Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity Recognize and distinguish syntax, run time, and semantic errors LEARNING ACTIVITIES Direct instruction Research RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 10
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT THREE: INPUT, PROCESSING, OUTPUT 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 11
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Programs take an input and convert it into a desired output ENDURING UNDERSTANDINGS A program is a sequence of instructions that specifies how to perform a computation that can be mathematical or symbolic. River Dell Regional School District 12
ASSESSMENT Teacher Observation Paper and pencil quizzes/tests Homework Student produced programs/functions ESSENTIAL QUESTIONS 1. What are the aspects of program design? 2. What do input, output, and processing signify? 3. What is the function of Comments? 4. How are outputs displayed? 5. What are String Literals? 6. How are Numeric Literals classified? 7. What are Operators? 8. How are Variables assigned? LESSON OBJECTIVES Students will be able to: Understand the flow process of a program Understand that input is the data the computer receives while output is the result of the operation Understand that processing is how computers work to execute the commands Understand that Comments allow programmers to annotate their code Understand that a String is a sequence of characters that is used as data Understand that the computer will classify numerical literals as Integers (whole numbers) or Floats (real numbers) Understand that Operators perform mathematical tasks like addition, subtraction, multiplication, division, exponentiation, and remainder functions Understand that a Variable can be assigned to ask the user for data, categorize stored inputted values as string, float, and integer, and format outputted arguments by specifying the spacing between strings, the number of decimal places for floats, and the place value integers are rounded to Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective River Dell Regional School District 13
Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 14
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT FOUR: DECISION STRUCTURES AND LOGIC 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy River Dell Regional School District 15
CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Computer programs apply decision structures based on the conditions set by the coder River Dell Regional School District 16
ENDURING UNDERSTANDINGS The rules of logic apply in computer programming ASSESSMENTS Teacher Observation Paper and pencil quizzes/tests Homework Student produced programs/functions ESSENTIAL QUESTIONS 1. How do the rules of logic apply to computer programming? 2. How is the IF conditional statement used in Python? 3. What are Boolean expressions? 4. What are Boolean operators? 5. What condition are IF-Else statements used? 6. What condition are ELIF statement used? 7. When are Logical Operators used? 8. What are the applications of programs that use conditional statements? LESSON OBJECTIVES Students will be able to: Understand that logic shows relatedness through statements Understand that IF statements call the computer to recognize whether data matches a specific condition Use Boolean operators (greater than, less than, or equal to) to write conditional statements in programs and compare various Boolean expressions Understand that Boolean expressions and operators will output one of two values, either True or False Use If-Else alternative execution statements to tell the program to carry out one command if the condition is satisfied and a different command if it is not Use the ELIF statement to tell the program to test multiple conditions before resorting to the command of the Else condition Use operators such as and to combine multiple conditions simultaneously, or to allow various options, and not to see that something does not satisfy a certain condition Create decision trees and write programs that model them River Dell Regional School District 17
Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 18
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT FIVE: REPETITION STRUCTURES 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 19
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Computer programming allows for tasks to be completed more expeditiously ENDURING UNDERSTANDINGS A loop is part of a program that can execute repeatedly River Dell Regional School District 20
ASSESSMENTS Teacher Observation Paper and pencil quizzes/tests Homework Student produced programs/functions ESSENTIAL QUESTIONS 1. What is a While loop? 2. What is a For loop? 3. What does a Loop Counter do? 4. What is a Sentinel? 5. What are Nested loops 6. What are the applications of programs that use loops? LESSON OBJECTIVES Students will be able to: Understand that while loops call on a program to repeat a set of commands for as long as certain conditions are true Understand that For loops is a count-controlled loop and calls the program to repeat a set of commands for as many times as specified Understand that the range function will call the program to count in the real number system and can specify the start/end points Understand that the For and While loop can be repeated the number of times represented by an accumulated variable that can be set by the user Understand that there exists infinite loops which must be executed by the user by sentinel values as End, Return, or by shutting down the program completely Understand that in order for certain functions to run correctly, the user must input valid data that will allow the program to run its course Loop a program forcing the user to input valid data otherwise causing the program to ask for a new input value Create more complex Nested loops Explore certain programs that require loops within other loops and understand why it is necessary/helpful for real life applications Write programs with loops, accumulating variables, and that force the user to input valid data for their desired functions/algorithms Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes River Dell Regional School District 21
Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 22
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT SIX: FUNCTIONS 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 23
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Computer programming can be applied to a multitude of tasks ENDURING UNDERSTANDINGS A function is a named sequence of statements that performs a computation River Dell Regional School District 24
ASSESSMENTS Teacher Observation Paper and pencil quizzes/tests Homework Student produced programs/functions ESSENTIAL QUESTIONS 1. What is the relationship between functions and algorithms 2. How are functions defined? 3. How do you a call a function? 4. How do you design a program to use functions? 5. What are differences between Local and Global variables? LESSON OBJECTIVES Students will be able to: Understand that functions are algorithms; a set of steps based off of the math operators Define and name their own functions that will call the program to follow a set of steps that were specified by the coder Understand that each function must specify the category of data required, the number of arguments, have an algorithmic process attached to it, and in certain cases output or return a value Use the functions that they defined within their programs Understand that in order for their function to run correctly, the coder must allow the user to input the correct amount of valid pieces of data Understand that once a function is defined, the process does not need to be repeated in the program ever again Understand that local variables are set within the process of a function Understand that global variables are defined outside of a function and hold their values at all times Experiment with local and global variables, testing the strengths and weaknesses of each Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective River Dell Regional School District 25
Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 26
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT SEVEN: VALUE RETURNING FUNCTIONS AND MODULES 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy River Dell Regional School District 27
CCSS ELA-Literacy RST 11-12-2 Determine the central ideas and conclusions of a text CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Functions and modules are building blocks to programs that pre-exist that can be integrated into a program River Dell Regional School District 28
ENDURING UNDERSTANDINGS A module is a file that contains a collection of related functions and other definitions ASSSESSMENTS Teacher Observation Paper and pencil quizzes/tests Homework Student produced programs/functions ESSENTIAL QUESTIONS 1. What are the benefits of pre-packaged modules? 2. What are some examples of pre-packaged modules and their uses? LESSON OBJECTIVES Students will be able to: Understand that Python has pre-packaged modules that when imported into a program allow for a coder to call on functions previously defined in those modules Understand how the Random Module is imported and used within a program to generate random numbers Understand how the Math Module is imported and used to carry out mathematical algorithms Understand how the Turtle Module is imported and used to allow students to draw and how the repetition loops are used in computerized graphics Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities River Dell Regional School District 29
Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 30
STANDARDS COMPUTER PROGRAMING with PYTHON CURRICULUM UNIT EIGHT: INDEPENDENT PROJECT 8.2.12.B.4 8.2.12.C.4 8.2.12.C.7 8.2.12.E.1 8.2.12.E.2 8.2.12.E.3 Investigate a technology used in a given period of history and identify how they may have changed to meet human wants and needs Explain and identify interdependent systems and their functions Use a design process to devise a technological product that addresses a global problem Demonstrate an understanding of the problem solving capacity of computers in our world Analyze the relationship between internal and external computer components Use a programming language to solve problems or accomplish a task CCSS.MathPractice MP1 Make sense of problems and persevere in solving them CCSS.MathPractice MP2 Reason abstractly and quantitatively CCSS.MathPractice MP3 Construct viable arguments and critique the reasoning of others CCSS.MathPractice MP6 Attend to precision CCSS.MathPractice MP7 Look for and make use of structure HS-PS4-5 Communicate technical information about how some technological devices use the principle of wave behavior and wave interactions with matter to transmit and capture information energy CCSS ELA-LiteracyRST 11-12-2 Determine the central ideas and conclusions of a text River Dell Regional School District 31
CCSS ELA-LiteracyRST 11-12-4 Determine the meaning of symbols, key terms, and other domain specific words CCSS ELA-LiteracyRST 11-12-7 Integrate and evaluate multiple sources of information presented in diverse formats and media CRP2 CRP4 CRP6 CRP7 CRP8 CRP11 9.1.12.A.1 9.1.12.C.4 9.1.12.D.1 9.1.12.E.1 9.1.12.F.2 Apply appropriate academic and technical skills Communicate clearly and effectively and within reason Demonstrate creativity and innovation Employ valid and reliable research strategies Utilize critical thinking to make sense of problems and persevere in solving them Use technology to enhance productivity Apply critical thinking and problem solving strategies during structured learning experiences Demonstrate leadership and collaborative skills when participating in online communities and structured learning experiences Interpret spoken and written communication within the appropriate cultural context Create messages for different purposes and audiences with sensitivity to cultural, gender, and age diversity, using various digital media outlets Demonstrate a positive work ethic in various settings, including the classroom and during structured learning experiences 8.1 Use digital tools to access, manage, evaluate, and synthesize information in order to solve problems and communicate knowledge BIG IDEAS/COMMON THREADS Programming is a language that can direct a computer to solve real life problems ENDURING UNDERSTANDINGS The single most important skill for a computer programmer is an ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately River Dell Regional School District 32
ASSESSMENTS Teacher Observation Project (Rubric criteria to include: Creativity, Functionality, Usefulness, Comments) ESSENTIAL QUESTIONS 1. How can the concepts/functions learned in the course be applied to solve real world problems? 2. How can one expand the possibilities of programming based on the accumulated knowledge? LESSON OBJECTIVES Students will be able to: Appreciate the power of programming Apply their knowledge about programming to solve a problem Think creatively about ways to use and expand their knowledge about programming Develop expertise through research about a problem and make a claim to support a solution Work as a contributing member of a team to achieve specific outcomes Show respect for divergent points of view by acknowledging them Recognize how digital media impacts a person s perspective Show the self-discipline to do your best, reach a goal or perform an assigned task with good work quality Apply technology to enhance meaning, communication and productivity LEARNING ACTIVITIES Direct instruction Research Group problem solving activities Code writing activities Debugging activities RESOURCES Starting Out with Python by Tony Gaddis Think Python: How to Think Like a Computer Scientist by Allen Downey www.repl.it www.python.org River Dell Regional School District 33