PowerPoint Presentation - Computer Science

advertisement
Using the comprehension of Python
programming as a method of teaching
middle-school Mathematics
Definition and Proposal
(x,y)
radiusY

centerY
x = centerX + cos()radiusX
y = centerY + sin()radiusY
radiusX
centerX
( x, y )  (centerX


radiusX
Dean L. Zeller


  cos


,
Dr. Paul Wang, advisor
Department of Computer Science
Kent State University
horizontal
offset
fractionof
radius to add
centerY


radiusY


  sin


)
vertical
offset
fractionof
radius to subtract
Low Student Motivation in Math
• “Math is boring.”
– Some elements of mathematics are not very exciting.
• “I hate math.”
– Students feel antiphony towards mathematics.
• “Math is too hard.”
– Students get frustrated at the complexity of mathematics.
• “When will I ever use this?”
– Students do not see a practical application of the
mathematics material.
– Honestly, what is the immediate purpose of factoring (x2-1)
into (x+1)(x–1)?
• “Where is the fun in math?”
Slide 2
Yet students LOVE computers…
• “This is fun!”
– Students enjoy using a computer for any purpose.
• “This is easy!”
– If taught correctly, the basics of programming and user
interfaces are quite easy to learn.
• “I love computers.”
– Students are naturally drawn to computers and
programming.
• “This is neat!”
– Students see an immediate application of what they are
learning.
Slide 3
Roadblocks to a CS course
• Difficult for schools to create a dedicated
computer science course
• Scheduling
– Hiring a teacher certified in computer science
– Fitting course into student schedules
– Designing a curriculum
• Lack of administrator motivation
– Computer science is not covered on any school
assessment exam
Slide 4
Mathematics curriculum
incorporating programming
• Rather than create a separate computer science
class, use programming as a delivery method for
mathematics instruction.
• No additional scheduling required – students are
already taking mathematics.
• Requirements
–
–
–
–
Computer lab
Teacher training
Software installations and maintenance
Align with Ohio Department of Education
Slide 5
Why Python?
•
•
•
•
Easy to learn
Powerful
“Batteries Included”
Strong following
Slide 6
Other Language Choices
• Scalable Vector Graphics (SVG)
– Superior graphics capabilities
– Could be used in an art class
• Mathematics Education Markup Language
(MeML)
– Students create complex graphs and charts
– Target towards accelerated or advanced classes
Slide 7
Possible Curriculum Topics
• Graphics programming
– Designing pictures in an XY-coordinate plane
• Statistics
– Calculations are inherently loop, list, and
function driven.
• Scientific research
– Bioinformatics
Slide 8
Examples
•
•
•
•
•
•
•
Graphics programming
Functions
Scalable graphic functions
Interactive stories
Algorithmic art
Software maintenance
Scientific research in bioinformatics
Slide 9
Graphics programming
• Demonstrate the simple nature of creating pictures
in an XY-coordinate system
• Hard-coded coordinate values
• Inverted Y-axis is not a problem
• Trace existing graphics programs
– Students given code, must produce correct output by
hand on graph paper
– Students then check their work by entering the code
into the IDLE programming environment
• Allow student to be creative in the learning of
mathematics by creating their own pictures
Slide 10
Picture 1: Vroom!!!
c.create_polygon(240,180, 270,180, 280,140, 220,140, 160,100,
70,100, 50,140, 50,180, 60,180, 240,180,
fill="light blue", outline="black")
c.create_oval( 60,160, 100,200, fill="light grey", width=5)
c.create_oval(200,160, 240,200, fill="light grey", width=5)
c.create_polygon(60,140, 80,140, 80,110, 60,140,
fill="white", outline="black")
c.create_rectangle(90,110, 120,140, fill="white")
c.create_polygon(130,110, 130,140, 200,140, 160,110, 130,110,
fill="white", outline="black")
c.create_line(10,110, 50,110)
c.create_line(0,130, 40,130)
c.create_line(0,150, 40,150)
c.create_line(0,170, 40,170)
Slide 11
Picture 2: Stop
c.create_rectangle(0,0, 250,400, fill='black')
c.create_rectangle(140,30, 160,50,
outline='grey', fill='grey', width=2)
c.create_rectangle(140,250, 160,400,
outline='grey', fill='grey', width=2)
c.create_polygon(110,250, 190,250, 250,190, 250,110,
190,50, 110,50, 50,110, 50,190, 110,250,
fill='red', outline='white', width=3)
c.create_oval(148, 58, 152,62, fill='black')
c.create_oval(148,238, 152,242, fill='black')
c.create_line(100,130, 100,120, 70,120, 70,150,
100,150, 100,180, 70,180, 70,170,
width=5, fill='white')
c.create_line(110,120, 150,120, width=5, fill='white')
c.create_line(130,120, 130,180, width=5, fill='white')
c.create_rectangle(160,120, 190,180,
width=5, outline='white')
c.create_line(200,180, 200,120, 230,120, 230,150, 200,150,
width=5, fill='white')
Slide 12
Picture 3: We Have Visitors
c.create_oval(50,100, 250,300, fill='green')
c.create_oval(130,130, 170,170, fill='red')
c.create_oval(147,147, 153,154, fill='black')
c.create_line(90,200, 120,240, 180,240, 210,200, width=2)
c.create_polygon(130,240, 140,240, 135,250, fill='black')
c.create_polygon(160,240, 170,240, 165,250, fill='black')
c.create_line(110,130, 80,50, 110,50, 120,70, 130,30,
140,70, 150,30, 160,70, 170,30, 180,70,
190,50, 220,50, 190,130,
fill='orange', width=3)
c.create_oval(77,47, 83,53, fill='black')
c.create_oval(217,47, 223,53, fill='black')
Slide 13
Examples of Student Work
Slide 14
Stage, by Justin Fassnacht
Storybook, by Andrew Demiglio
Wizard, by Nick Myers
Carrot, by Ryan Snyder
Platypus, by Sarah Jurkovich
Slide 15
Scenery Functions
• Introduce concept of functions early
• Similar to Objects-First pedagogical design,
but not quite as complex
• Create scenery for illustrated story
• Still hard-coded coordinate values
Slide 16
Ghost Town, by Justin Fassnacht
Kitchen, by Menelik Zafir
Spaceship Dashboard, by Andrew DeMiglio
Desert, by Joe Hurst
Slide 17
Scalable graphic functions
• Create grid of guides for scalability
• Can solve inverted Y-axis
• Introduce concepts of software engineering
–
–
–
–
Libraries and reusable code
Consistent function design
Documentation
Collaboration (without “group projects”)
Slide 18
PZ-30 robot, by Andrew DeMiglio
Spaceship, by Andrew DeMiglio
Boat, by Nick Myers
Space Shuttle, by Nick Myers
Slide 19
Trigonometry: Points on a Circle
opposite
sin  
hypotenuse
hypotenuse

0
opposite
(x,y)
radius = 1
x = cos()
adjacent
y = sin()
adjacent
cos  
hypotenuse
0
(x,y)
radiusY

centerY
x = centerX + cos()radiusX
y = centerY + sin()radiusY
radiusX
centerX
( x, y )  (centerX


radiusX


radiusY


  cos


, centerY


  sin


)
horizontal
offset
fractionof
radius to add
vertical
offset
fractionof
radius to subtract
Slide 20
width
radiusX
Application of
Points on a Circle
(Polar Coordinates)
p1
p2
radiusY
72
72
72
72
72
centerY
p0
height
p3
p4
centerX
Slide 21
Olympic Rings, by Joe Hurst
Starburst, by James Dziemianzuk
Windows, by Valarie D’Antonio
Slide 22
Interactive Stories
• User decides direction of story
• Collaboration: include pictures from library
Slide 23
Slide 24
Algorithmic Art
• Excellent demonstration of for-loops
Boomerang, by Ryan Snyder
Spiral, by Ryan Snyder
Slide 25
Line Art
Slide 26
Mazes
•
•
•
•
Modify large program written by instructor
Document changes to code
Implement own features
Future work: use event-driven
programming to give a game-like feel to
program
Slide 27
Slide 28
Bioinformatics Research
• DNA Analysis
• Pattern matching
+--------------------------------------------------------------------+
|
DNA Statistics Report
|
+--------------------------------------------------------------------+
A: 62553
C: 42531
G: 34444
T: 65667
AT: 20100
CG: 5999
CAT: 4719
ACT: 3085
Enter search pattern: ATCGT
Occurrences:
Enter search pattern: AAAAA
Occurrences:
Enter search pattern: CTGTTT
Occurrences:
Enter search pattern: AAAAAA
Occurrences:
Enter search pattern: ACTTTTT
Occurrences:
Enter search pattern: TTCTTCC
Occurrences:
Enter search pattern: TTATTATT
Occurrences:
228
1028
86
328
72
26
24
Slide 29
DNA Visualization
A
Initial Setup
T
A
T
AT + A
C
A
G
T
C
A
G
T
+A
ATA + G
C
A
G
T
C
A
G
T
A+T
C
G
ATAG + C
C
G
Slide 30
Actual DNA
A
C
T
G
Slide 31
Research Study Proposal
• Two equal-level middle-school mathematics
classes
– Treatment group: uses programming as a method of
learning mathematics
– Control group: uses traditional methods of learning
mathematics
• Pre/Post test research design
– Hypothesis: students in treatment group will improve
in mathematical ability more than those in the control
group.
• Post survey on attitudes towards mathematics.
– Hypothesis: students in treatment group will have more
favorable attitudes towards mathematics than those in
the control group.
Slide 32
Research design
• Classes will meet every day with assigned
classroom teacher.
• I will teach lessons in programming mathematics
three days per week for fifteen weeks.
• I will assign and grade programming projects.
• Regular teacher remains in classroom during
programming instruction.
• Pre-test given in week 1 to determine baseline.
• Post-test given in week 15 to determine
improvement.
• 22 repeated measures design.
Slide 33
Pilot studies
• This pedagogical philosophy has been
tested on three college-level computer
science classes.
– CS10061 (Spring 2007, 17 students)
– CS10051 (Fall 2007, 24 students)
– CS10061 (Spring 2008, 12 students)
• Hand-drawn assignments tested on middleand high-school mathematics classes at
Kansas City Missouri School District.
Slide 34
Download