Long talk given at the first Snap! Conference .
SnapCon19, Heidelberg, September 22 - 25, 2019
https://www.didaktik-aktuell.de/index.php/snapcon19
My Snap! projects: https://snap.berkeley.edu/user?user=nathalierun
This work is delivered under the Creative Common License:
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
https://creativecommons.org/licenses/by-sa/4.0/
Snap!, a powerful tool for studying algorithms in high school
1. SnapCon19, Heidelberg,
September 22 - 25, 2019
Katy’s mind map,
2nd last year student in sciences (Première S).
Snap!, a powerful tool
for studying algorithms in high school
Snap!, a powerful tool for understanding
mathematics through algorithms in high
school
2. 2nd last year student in sciences (Première S).
Nell’s mind map
4. Snap!
On the website lycee.nathalierun.net I have written everything that had been done in
class.
I used Snap! in class for the first time in march 2016.
I introduced Snap! and Scratch the same way I would for a 10 year old child. My students
are 16-17 year olds. But my practice with Snap! in class advanced a lot, which made me
progress in teaching Mathematics.
As I am part of the IREM (Institute Research on teaching Mathematics), I wrote
several articles on using Snap! in class.
The first article I dedicated to Snap! was written in April 2017 :
`Coder des algorithmes avec Snap! - Programmation visuelle au lycée`
(programming algorithms with Snap!, visual programming in high school)
Here is an image of the first time I used Snap! in class to illustrate the
concept of function. It was in February 2017.
nathalierun.net/lycee/piwigo/picture.php?/6380/category/104
Since that day, everything has been coded as a function, thanks to Snap!.
Input
Box
Output
Snap! cloud actually hosts
2.5 millions projects, of
which about :
- 800,000 shared projects,
- 125 published projects.
The Scratch which lets you code the code
the `Scratch` to code the code
5. Tradition wants to build Mathematical basis
on set theory. It can be proved that you can
put the notion of a Function in the center
of the structure. The argument comes from
Alonzo Church's work. Alonzo Church is well
known for his lambda calculus development,
which leads to functional programming in
which computation is based on mathematical
functions evaluation.
Thanks to my years of teaching to 2nd last year students in sciences (Première S), I
sense that every Math'algorithm is a Function. Moreover, Snap! totally convinced me of
this fact, thus helping me to illustrate and to corroborate it.
Never had any mathematical conversations
with anybody, because there was nobody
else in my field.
Alonzo Church
Mathématicien, Logicien
(14 June, 1903 – 11 August, 1995)
Moreover, one can notice
this anecdote: Snap!
mascot’s name is Alonzo and
it’s hair is slicked and
drawn in the form of a
Lambda...
λ
images.math.cnrs.fr/Et-si-on-commencait-par-les.html
Snap! and Functional Programming
6. When you think permanently in Computational thinking, this allows a better and
clearer mathematical thinking.
What is Computational thinking ?
Jeanette Wing gave this definition in 2011
revue.sesamath.net/spip.php?article1096
Computer science teacher,
born in 1956,
MIT graduated.
Computational thinking will develop a functional way of
thinking in the students’ minds.
In fact, following Computational thinking leads to:
analyze a problem, break it down into many small functions with very specific and
very small tasks.
Computational thinking
Thought processes involved in
formulating a problem and
expressing its solution(s) in such
a way that a computer—human or
machine can effectively carry out.
7. And Snap! is good for this. So, I practiced in class in real time a computational
thinking always illustrated with Snap! scripts, close to a scripting language
illustrating the natural language.
Through out the year, I therefore tried to approach any notion in terms of
algorithms.
I used Snap! in class
to write any
algorithm but also to
code it and to test
it.
The idea is to open students' minds to a computational thinking,
independent to a precise programming language.
Of course, I used Python also
as a textual programming
language ...
As it is part of the french
curriculum.
algorithm research
in class
Write, code and test
8. Every day, I try to lead my
students to Computational
Thinking, to continuously
think in term of Functions.
We enter objects in the Box, whatever they are. The box treats and brings back a result, the
one which is expected by the student. This obliges my students to think Mathematics in terms
of objects. To understand that Functions are not only Numbers, algorithms neither, and a
result is not necessarily numerical. From this teaching experience, their feedback has made
me grow. I feel like I’m on the right pass. They have also made me learn new things and
realize the power of this functional vision of the Algorithmic.
From algorithms to functions...
Input
Box
Output
One day, during an activity on the Von
Koch snowflake, I asked my students
which object was returned back by the
algorithm. Aliyah answered me, as an
evidence, "Et bien, le dessin
Madame ! » (« Of course, the drawing
Miss ! »).
We deduced together that this
algorithm was effectively a function:
a relation between a set of entries,
treated in the Box (the algorithm),
and the output drawing.
The algorithmic revisited with Snap! and Python
11. Inputs-outputs notions
Two essential ideas: the universal notion of a function on one hand and
programming as a production of a text in a computer language on the other
hand.
The notion of a function in Mathematics and Computer science come under
the same universal concept.
In the third last year Program Accompanying Document:
Programming Algorithms
Some extracts ...
Note that the input/output functions (input and print functions) are not developed in this
document. They do not belong to algorithmic thinking and the program's emphasis on the
notion of functions make it possible to get rid of it completely.
Algorithmic No language, no software is imposed.
But the use of Python is advocated
Algorithms have a natural place in all fields of Mathematics and the problems posed.
In the official Mathematics program of the
2nd and 3rd last years of high-school...
12. For the sake of simplicity and coherence, an evolution in the way you write
algorithms was proposed in subjects of Baccalaureat obeying the following
principles:
we got rid of the declaration of the variables, the assumptions
made on the variables being specified elsewhere
we got rid of input/output (consistent with the new
accompanying document in 3rd last year of high-school - p5)
simplification of the
syntax, with the symbol ←
for the assignment.
←
←
←
From June 2018
S ← 0
U ← 900
for i from 1 to 10
S ← ...
U ← 0,75 U + 12
end for
Pseudo-code
Evolution of the way you write algorithms
in « Baccalaureat »
13. Let's build the program of 2nd last
year of high-school...
... under an algorithmic vision
... through a functional approach
I try to free students from I/O and make them think
independently of a programming language.
Focus on the essentials: understanding mathematics through
algorithms.
15. Students must arrange the blocks in the
correct order to obtain the requested
function.
1
2
3
nathalierun.net/lycee/piwigo/picture.php?/7416/category/125
Which order ?
16. Students must arrange the blocks in the
correct order to obtain the requested
function.
1
2
3
nathalierun.net/lycee/piwigo/picture.php?/7416/category/125
Which order ?
18. Quadratic factorization
Sign of a quadratic expression
Quadratic equation
Snap allowed me to
instill computational
thinking in my
students: analyze a
problem, break it
down into many small
functions with very
specific and very
small tasks.
Quadratic functions study:creating a Snap! software
19. Quadratic equation
Here is a very specific
and very small task, a
part of what we can do
with a quadratic
equation.
Solving a quadratic equation with Snap!
20. analyzing the problem
to be able to create
a Snap! software
Computes the top of the
parabola
Quadratic function study:
Computes the
factorization of the
quadratic expression.
Analyze a problem,
break it down into
many small functions
with very specific and
very small tasks...
21. The problem was broken
down into many small
functions with very
specific and very small
tasks.
This is typically a Computational thinking
rigorous approach, according to Jeanette Wing.
Solving a quadratic function with Snap!
23. Bring operators to the data:
essence of functional programming...
map/combine works hand in hand
and gives us a very powerful
tool to work on numbers.
Making a table of values
becomes child's play with
Snap's lists!
Bringing Algorithms to Data:
Essence of Functional Programming ...
28. Examples of Numerical sequences
here are some very commun results
when we study series.
It’s instant.
Sum of integers (Triangular numbers)
Sum of squares (square pyramidal numbers)
Sum of cubes (Squared triangular numbers)
34. Euclidean algorithm
Arithmetic is one of the areas
of mathematics most appropriate
to start programming.
a bit of arithmetic algorithms...
greatest commun divisor
41. Numerical sequences
Calculations
Sketch
Ruler and Compass construction
blank paper
Ruler and Compass
A3
A4
a very sharp pencil
Study of sequences’ limits
Introduction
discovery
Recursive expression
Delimited figures
with infinite perimeter
Philosophy of the infinity
Initiate to recursive thinking
shapes
auto similarity
Algorithmic
Maths’ enchantment
The beauty of Fractals
Algorithms in geometry
by hand
Computer programming
Geometry
Thales’ theorem
Orientate the plan
Enjoy doing Maths
Numerical algorithms
Fractals
in class
Pythagorean’ theorem
Develop Computational Thinking
Fractals
in class
address/tackle = aborder
ludic/fun
42. to connect
Data, Initialisations
Hand sketching
First calculations
A part on algorithms
Computer programming
Back to calculations
Homework map
Paper sketch
Algorithms and computer
programming
Geometry and plane orientation
Calculations and numerical sequences
School year 2018-2019
Study of the snowflakePremière S level
An assignment on Fractals
44. The algorithmic part is supposed to lead the
student to write a recursive function.
We deduced together that this algorithm was indeed a function.
It has all its ingredients: entries processed in a box, and the
resulting drawing.
Let’s introduce students to
the concept of recursion ...
When I asked the students what was
the object returned by the algorithm,
Aliyah said it was obvious: Well, the
drawing Miss.
45. Beauty and joy of computing...
The Snowflake
Von Koch Island
step 4
48. The orientation of the seed is chosen randomly at each step.
This idea came first to Benoît
Mandelbrot in early’s 1980’s
to ameliorate the simulation of britany's
coast
Random Van Koch...
51. Data : three points A,B,C, n step number
(the triangle ABC alone represents step 0)
Initialisations :
Triangle ABC
A* midpoint of [BC]
B* midpoint of [CA]
C* midpoint of [AB]
Fill the triangles BA*C*, A*CB*, C*B*A
Leave the triangle A*B*C* empty
Start over the previous process on each of the 3 triangles
BA*C*, A*CB*, C*B*A till step n.
Carry out the steps 1, 2, 3, 4 and 5.
For each step, give :
- the numbered of colored triangles T_n
- the length of each side c_n
- their separate areas a_n
- their separate perimeters p_n
- the whole area of the shaded (or colored) triangles A_n
- the whole perimeter of these triangles P_n
Sierpinski’s fractal Instructions for
the assignment
64. Seymour Papert
The role of the teacher is to
create the conditions for
innovation rather than
provide ready-made knowledge.
https://snap.berkeley.edu/user?user=nathalierun