UBD Instructional Unit Design
Python Programming in the 10th Grade
TBTE480: Curricular Design and Innovation Dr. Bodzin
Lifang Chang Fall 2007
INTRODUCTORY MATERIAL •
Unit Title: Python Programming
•
Grade level: 10th
•
Subject/Topic Areas: Computer Science
•
Key Words: computing, software, python, programming environments, source code, program
•
Designed by: Lifang Chang
•
Time Frame: 3 weeks
•
Brief Summary of Unit (including curricular context and unit goals): In this introductory unit of computer science course, students will
learn about python Integrated Development Environment (python IDE), the way of the writing program, python expressions, functions, control flows, and simple GUI (graphical user interface). They will design a small game using a Graphics API (Application Programming Interface) package provided for students of python, work in cooperative groups to analyze a few source code samples to help them on many programming concepts, and may take optional tasks on setting up a web host or a student sports-match record maintaining and sorting list. •
Technology application(s) used: Describe each technology application that is used in the unit and how it promotes learning.
1. Blogs: There will be a class blog where the instructor starts a few topic threads and each student is required to response to the questions or comments. Students can benefit from the peer discussion and are able to clarify the basic concept by analyzing some source code samples. 2. Python IDE: Students will need to install python software on Windows/Mac/Linux system depending on their working computers. With the
1
IDE installed, students are able to write, compile and debug source codes to complete their required assignments.
STAGE 1 – IDENTIFY DESIRED RESULTS •
Established Goals (include national standards): Computer Science Standard I (CS-I): Programming and Algorithm Design (http://cnets.iste.org/ncate/n_cs-stands.html#1)---- Students will demonstrate proficiency in programming that requires the use of data abstraction to solve non-trivial programming problems in multiple programming paradigms. CS-I.1 Students will demonstrate knowledge of and skill regarding the syntax and semantics of a high level programming language, its control structures, and its basic data representations. CS-I.2 Students will design, implement, and test programs in languages from two different programming paradigms (e.g. imperative and object-oriented) in a manner appropriate to each paradigm. •
What essential questions will be considered? 1. What do you expect one kind of programming language to be simple and effective? 2. What do we mean by numbers and object in computer programming? 3. How do you draw a picture with pixels (little squares or rectangles of color)? 4. Why are there many types of programming languages used by professional programmers? • Overarching questions (Point beyond a unit to big ideas and enduring understandings. Do not mention specific topics or events): 1. How to make python display the question? 2. How to calculate numbers in Python? 3. How to make python response to the user's input? 4. When do you need a "while loop"? Topical questions: 1. What command do you use to display "How are you" in screen? 2. How do you calculate "1+2" with python? 3. How do you configure the "black" color in python? 4. How do you make a computer guess numbers from 1-10? •
What understandings are desired? Students will understand that: 1. How to edit and run a python program 2. Variables, expressions, statements and functions in python 3. How to implement Graphics in python
2
Overarching enduring understandings for this unit (Transcend the content knowledge of the unit): Students will understand that: 1. The way of the computing program works 2. How to express the real-world problems into a logic order with python 3. How does GUI connect programming and application Topical enduring understandings for this unit (Are specific to the unit topic. Involve generalizations derived from the specific content knowledge and skills of the unit): Students will understand that: 1. The syntax of input, output, math, conditional execution and repetition in
python 2. Function definition, parameters and arguments. 3. The "import" statement and control flow statement •
What key knowledge and skills will students acquire as a result of this unit? Students will know…. 1. Key terms-- compile, variable name, function, boolean value, import, loop and module, loop. 2. Arithmetic and graphics in python. 3. General programming skills with python Students will be able to…. 1. Set up a python IDE environment and run python source codes. 2. Create a small graphics python program. 4. Analyze debug errors for further compiling.
STAGE 2 – DETERMINE ACCEPTABLE EVIDENCE •
•
What evidence will show that students understand? Performance Tasks: 1. Analyze source code samples—Students discuss a few source code samples posted on the class blog. The samples may include syntax errors and the instructor encourages students question or comment on the codes’ quality. 2. Design a simple game as the final assignment—Students create a small graphical game using the facilities in the specific graphic API package. Students can choose either shooting ball across a window or chasing the robot within one square. What other evidence needs to be collected in light of Stage 1 Desired Results? Other Evidence: (e.g. tests, quizzes, prompts, work samples, observations) Quiz—The number calculating, function definition and the graphics components. Prompt—Describe how the source code samples are quality or weak.
3
Optional tasks—Choose one of the three tasks for advanced programming excises. (1) Write a function which displays nine blank lines. (2) List and maintain a student-sports match record. (3) Integrate PyGresql to create a web-hosting website. •
Student Self-Assessment and Reflection: 1. Self-assess the game program. 2. Self-assess the blog source code samples discussion. 3. Reflect on the extent to which you learn about python programming at the end of unit.
ASSESSMENT TASK BLUEPRINT (see Wiggins and McTigue p.330 for an example). •
What understandings or goals will be assessed through this task? Students will design a small graphical game using ready-to-use Graphic API package to reflect their learning with the functions and loops.
•
What criteria are implied in the standards and understandings regardless of the task specifics? What qualities must student work demonstrate to signify that standards were met? Criteria: abstract reasoning, applied logic, effective use of modules. Work qualities: students need to learn about procedural, functional, and object oriented programming.
•
Through what authentic performance task will students demonstrate understanding? Task Overview Since we have been learning about Graphic API programming, the teacher in a younger-children class has asked us to prepare a small video game for her in-class use. Using the ready-to-use Graphic API package installed within your python software, design a simple game, either the shooting ball across a window or chasing the robot in one square. Your goal is to make the program accept user’s input and run on Windows/Mac system. In addition to your program, prepare a guideline to the teacher explaining how your program use and what main feature your program has. • What student products and performances will provide evidence of desired understandings? A graphical game used on a PC/Mac and a user guideline to the teacher. • By what criteria will student products and performances be evaluated? Game program: 1.The game is compiled without errors. 2. The game can be run in a PC or a Mac. 3. The graphic design should be aesthetically pleasing. User guideline: 1. Correct and effective explanation of program features to the user. 2. Proper writing format. 4
STAGE 3 – PLAN LEARNING EXPERIENCES What sequence of teaching and learning experiences will equip students to engage with, develop, and demonstrate the desired understandings? List the key teaching and learning activities in sequence in a daily format. Be specific to how technology is being used to promote learning. This section needs to be written specifically so a classroom teacher could implement the teaching and learning experiences in a classroom environment. Day 1: Introduce the driving question: What do you expect one kind of programming language to be simple and effective? Pretest two simple questions aligned to essential questions. Questions: Use either nature language or one kind of programming language, 1. How do you display “Hello, world” on the computer screen? 2. How do you calculate the “64+256” and get the sum result? Day 2: Brief overview of Python programming with a PowerPoint presentation including showing a python program components, debugging, syntax errors, runtime errors, and semantic errors. Clearly articulate behavior expectations in the computer lab. Students start with their first python program: print “Hello, world” on the computer screen. Focus on the difference between nature language and programming language. Day 3: 10 minute demonstration that includes: What are values and types in a computing program? How the interpreter evaluates an expression? Order of operation in python. Students practice on the assigned programming exercises. Instruct students how to debug among the code lines when the program does not show up the expectations. Focus on variables and operators. Have students note how python works in the mathematics logic. Day 4: 20 minute PowerPoint presentation that includes: Function definition and use; Parameters, arguments, and the import statement; Flow of execution. Students practice on an assigned programming exercise. For example, ask students define a function with cat_n_times, so that the program will print the string s, ntimes Day 5: No face-to-face meeting. Students can work with their own learning paces. Students will discuss on two source code samples posted in the class blog. At the same
5
time, encourage students share their programming works on the blog. Emphasize on the variables, operators and functions. Day 6: Introduction of conditionals to the class: What are Boolean values and expressions? What are logic operators? Conditional execution and Conditional execution; The return statement Students are assigned to work with a teammate. There are 6 programming exercises and each group may choose one of them to work on the lab’s computers. Instruct students how to think like a professional computer programmer. Focus on the logic expressions. Day 7: Instruct students to look at complete functions and help students to analyze what the functions’ running results are. Then introduction of an important programming technique called “incremental development”. The goal of incremental development is to avoid long debugging sessions by adding and testing only a small amount of code at a time. Students are assigned to work with a teammate. Each group works on one program exercise. Emphasize on the function type, programming with style and unit testing. Day 8: No face-to-face meeting. Students can work with their own learning paces. Students can work with their own learning paces. Students will discuss on three source code samples posted in the class blog. At the same time, encourage students share their programming works on the blog. Emphasize on the program planning, editing and debugging techniques. Day 9: Introduction of iteration. Model how to write a "while" statement. Scaffold the repetitive execution process. Have students identify conditions with False or True and have students note how the body of the loop should change the value of one or more variables so that eventually the condition becomes false and the loop terminates. Students practice on two assigned program exercises. Day 10: 10 minute PowerPoint presentation includes that: introduction of strings, traversal and “for” loop and looping and counting. Students are required to take one program exercise and submit their final game program’s topic. They can raise their own any favorite topic. Otherwise, they may choose one of the two topics: (1). shooting ball across a window: The game will shoot a ball across a window from left to right and the player will manipulate a mitt at the right side of the window to catch it. (2). chasing the robot within one square: The player is chased by a robot, and if the robot catches the player, the player is dead.
6
Day 11: Introduction of the Graphics to the class. Students are informed that they can use the existing already graphics packages provided by the instructor. Students need to know how to import the package to their program. Day 12: No face-to-face meeting. Students can work with their own learning paces. They will discuss two graphics program samples in the class blog. In addition, encourage advanced students share their programming works to the class blog. Day 13: Students discuss their game program planning. Instruct students to draw a flow chart to organize their thoughts. Day 14: No Face-to-face meeting. Students will work on their final game program. And raise questions, make comments or something like that on the class blog. Day 15: Posttest – three small programs aligned essential questions. 1. Choose two numbers (at random), display a sum. 2. Change the graphic’s background color. 3. Write a program counts the number of times the letter “a” appears in a string (e.g. banana).
UbD DESIGN STANDARDS In this section of your unit instructional design, clearly articulate how each facet of the design standards are met by responding to each question. Stage 1—To what extent does the design focus on the big ideas of targeted content? How are the targeted understandings enduring, based on transferable, big ideas at the heart of the discipline and in need of uncoverage? From the instructor’s modeling, students will know how to think as a professional programmer. Students are required take exercises in class, and then the instructor can scaffold the students how to express the real-world problems into a logic order with python. How are the targeted understandings framed by questions that spark meaningful connections, provoke genuine inquiry and deep thought, and encourage transfer? Provide specific learning task examples from the unit. Learning to think like a professional programmer involves a great deal of abstract reasoning and applied logic. Students in this class need to discuss on the class blog and work with a teammate. I believe the cooperating learning process will provoke students’ meaningful connections.
7
How are the essential questions provocative, arguable, and likely to generate inquiry around the central ideas (rather than a “pat” answer)? “What do you expect one kind of programming language to be simple and effective? ” is an essential question for this unit. Students who have programming experience can give their experience-related examples. At the same time, students who have no any programming experience can also give their explanations such as using natural language etc. Are appropriate goals (e.g., content standards, benchmarks, curriculum objectives) identified? What curricular standards outside the core discipline are identified? (e.g., which literacy, environmental education, or mathematics standards are met for a science unit on global climate change?) This unit is designed according to ISTE (International Society for Technology in Education) secondary computer science Education initial Endorsement. At the same time, it is a good unit for computer science in high school AP exam. Computer Science AP exam needs to use C++, but python is a good preparation for the C++ learning.
What is your evidence that valid and unit-relevant knowledge and skills are identified? Students have to work in-class with small program exercises, and they will submit a final small game program to prove what they learn in this unit. What common learner misconceptions (naïve conceptions) or predictable misunderstandings does your unit specifically address? Students who have no programming experience will generally be confused by the programming environment. They will practice in the school computer lab to overcome the possible programming environment problem. Also, they are given the download link and are able to discuss in the class blog to exchange configurative information if they would like to install the python environment at home. Python is open source software. It will be easy to install and use freely. Stage 2—To what extent do the assessments provide fair, valid, reliable and sufficient measures of the desired results?
How do students exhibit their understandings through authentic performance tasks? The students will attend high school computer science AP exam. The concept of the python programming will benefit them on abstract reasoning and logic thinking. Describe how a variety of appropriate assessment formats will be used to provide additional evidence of learning?
8
1. Formative assessment: students will be assessed at each face-to-face class. The instructor can scaffold students to program exercises. 2. Summative assessment: students will need to take a posttest and submit a final small video game to prove what they learn in this unit.
How will assessments be used as formative feedback for students and teachers? The in-class exercises will make the instructor and the students know what the learning and teaching is going on. The feedback is in-class and scaffolding. As far as posttest, students will run their program in the school’s computer lab. Students would get direct feedback from the instructor. A number will be (1-100) is assigned. The posttest will be 30% of the final course mark.
How will assessments be used as summative feedback for students and teachers? Students will submit their final program to the instructor. The instructor would run students’ program on his/her computer. Then the instructor will comment or give further suggestions to each student. Also, a number will be (1-100) is assigned. The final game will be 70% of the final course mark. Stage 3—To what extent is the learning plan effective and engaging?
How will students know where they’re going (the learning goals), why the material is important (reason for learning the content) and what is required of them (unit goal, performance requirements and evaluative criteria)? The instructor scaffolds on each in-class programming exercise. The instructor will info individual student where he/she is going. Since this unit is designed to support the teaching of programming to students with no previous programming experience, the python will benefit their future C++ learning in the computer science AP exam. This unit goal is to help students to learn python programming language for the effective use of modules and graphics programming. How will students be hooked—engaged in digging into the big ideas (e.g., through inquiry, research, problem solving, and experimentation)? This unit is full of handy programming exercises. The programming exercises will help
9
students to engage in digging into the big ideas. What opportunities will students have to explore and experience big ideas and receive instruction to equip them for the required performances? In this unit, the in-class learning activities will encourage students to explore and experience big ideas. How will students evaluate their work, reflect on their learning, and set goals? There will be a self-assessment for each student. They can evaluate their work using selfassessment sheet. The criteria will be similar with the below rubric. How is the instructional unit tailored and flexible to address the interests and learning styles of all students? The unit provides students optional choices on each learning activities stage such as inclass exercises and final game topics etc. How is instruction organized and sequenced to maximize engagement and effectiveness? The plan of learning activities with 15 days sequence will help teacher to introduce the programming concept from simple to a little complex.
ASSESSMENT EVIDENCE In this section, you will provide appropriate scoring tools used to evaluate student products, performances, and content understandings? Specific Performance Task Examples and Scoring Criteria. Include the actual performance tasks the learners would receive. Include at least one analytic trait rubric. Students’ in-class exercises will be assessed by showing the running results to the instructor. The following rubric will be used for self-assessment and final game program assessment.
10
Criteria Does the program adhere to syntaxes in every detail?
Does the program demonstrate good modular design?
90-100% Excellent No errors
70-80% Adequate Minor details of the standards are violated, or poor choices are made where the standards are unclear.
No errors
1-3 minor errors
Can the program run on Works one system? correctly in all cases.
Is the user interface No errors clear and maintainable?
Does the source code use the python language features well?
No errors
10-60% Substandard Significant details of the standards or the underlying program intent are violated, but the program still fulfills essential functions. More than three minor errors OR one major error Fails for typical input, for a minor reason.
Works for typical input, may fail for minor special cases. 1-3 minor More than three errors minor errors OR one major error 1-3 minor More than three errors minor errors OR one major error
0% No effort Misses the point of the problem.
More than one major error Fails for typical input, for a significant reason. More than one major error More than one major error
Specific Academic Prompts. List the specific open-ended questions or problems that require the students to think critically during the unit. How do you calculate the multiple of one number? How do you draw a line on the computer? How do you make a point move on the computer screen? What do you know your program is effective?
11
Quiz and Test Items. List the specific quiz and test items that will be included in the unit to assess content knowledge. Provide an answer key. In-class Exercises: 1. Count 1+2+3+4 >>> 1+2+3+4 10 2. Print “Hello, World” >>> ’hello,’ + ’world’ ’hello, world’ 3. Giving names and calculate >>> salary=123456 salary*4 493824 4. Draw a line in red. >>> from GASP import * begin_graphics() set_colour(Colour.red) move(100,100) draw(200,100) set_colour(Colour.blue) draw(100,200) end_graphics() 5. Prints all the even numbers between one and nineteen. >>>for number in range(20): if number % 2 == 0: print number Posttest: 1. Choose two numbers (at random), display a sum. >>>from GASP import * a= random_between(10,15) b= random_between(20, 25) sum = a+b print sum 2. Change one graphic’s background color. >>> from GASP import * Cl = GASP()
12
Cl.set_color(‘red’) 3. Counts the number of times the letter “a” appears in a string. >>>fruit = "banana" count = 0 for char in fruit: if char == 'a': count += 1 print count Final game program: 1. Shooting ball: >>>from GASP import * begin_graphics(800, 600, title="Catch", background=color.yellow) x = 10 y = 300 ball = Circle((x, y), 10, filled=True) dx = 4 dy = 1 while x < 810: x += dx y += dy move_to(ball, (x, y)) sleep(0.01) end_graphics() 2. chasing robot: >>>from GASP import * begin_graphics() allow_moveables() place_player() finished = 0 while not finished: move_player() end_graphics() from GASP import * import time See Sheet T for more about this begin_graphics() while 1: keys = keys_pressed()
13
print keys
14