Basic School Scripts
to consolidate learning, discover properties, avoid mechanical and insignificant calculations, …
(and to practice without teacher control)

[If you want, you can save the files to your computer by clicking on their name with the right mouse button]

A  integers - 0
 
minutes    

integers - 1
0 + 100 + 100 + 100 + 10 + 10 + 1 + 1 + 1 + 1 + 1 → 325
0 + 100 + 100 - 1 - 1 - 1→ 197

 +   −  

what number is it?
what number is it?

   

integers - 2

scientific notation

    
B  At the age of 5, I can draw "by hand" cross diagrams like the one on the left.  Then the teacher can make the pupils internalize the link between quantities and lengths using histograms with squares (see the figure on the right) which he can prepare with this simple script (see the examples).
Subsequently, Subsequently, the teacher can have the pupils use a script  (block diagrams)  to easily create diagrams without squares, even of larger sizes.   
  

With this version,  block diagrams-1,  as depicted on the right,  I can draw multiple histograms so that (see below) the joins of the columns of the various histograms are equally long.  At the adult level, these histograms represent percentages.
                                 

Then, abstract exercises can also be proposed, such as:
                "find A, B, C and D that produce the figure alongside".


Then, to get the percentages, I can use  block diagrams-2
(right figure)  or also  strip diagrams  (left figure)
  

   With bar graphs
you can make simple charts
 By bar graphs of sequences you can
make histograms with the same scale
       

C  decimal numbers
    the numbers of the clock  
 

first equations (A)   first equations (B)   first equations (C)   first equations (D)

|||||||||||   QUIZ (examples)  

D  pocket calculator                
First use
I can do addition and subtraction operations, and operationally explore negative numbers.
I can do multiplication, build multiplication tables, explore what happens by multiplying and dividing by 10, 100, …
I explore the meaning of the [C] key.
I find that I can enter numbers digit by digit with the keys or I can write them directly into the input box.
I find that I can also put one or more of one of the 4 operations.
I observe that I can copy results or write other things in the gray boxes.
I discover the priority of operations (1+2*3 → 7, not 9).
I can impose an order in which to perform operations using parentheses: (1+2)*3

 
E  division
(it reproduces the division by hand)
I discover that
doing the division between two whole numbers sooner or later I get a repeating digit (0, 1, …, 9) or a group of digits, and I can understand that the number of repeating digits must be less than second term of the division (in the case illustrated above there are 16).


  ratio  between two (whole or not) numbers, also in percentage form 
                          (examples)

  slope of a line OP

F  calculations with anyway large integers
Sums and products
between integers are obviously limited numbers.  It is easy to calculate, but it is equally easy to make careless mistakes.  Once you have learned the procedure on small numbers, you can then approach the computer.  But calculations with long numbers almost never happen to have to face them.

G  area triangle and parallelogram                          
It is easy
(using an animation) to "prove" the extent of the area of a parallelogram and a triangle.

area of simple quadrilaterals

H  pocket calculator                  
Second use
With the script for calculations with integers seen above, running 20/17 I get 1.176470588235294117647058823529411…, with this calculator I get 1.1764705882,  but I can increase the number of digits after ".".  If I put 13 I get 1.1764705882353, a rounding to 13 digits after the "." (...23529... → ...2353 as 9 ≥ 5).  If I put 1 I get 1.2.  For all practical discoveries you need a few figures.
I can also round to digits before ".".  To find out how much each 3 people have to put in to form 2000 euros I make 200/3 getting 666.666666667;  if I want to round to integers I choose "0 digits later." obtaining 667;  if I want to round off to tens of euros, I choose -1 digits after "." (ie "1 digit before .") resulting in 670.
Multiple pairs of parentheses can also be used:  ((1+1)*2+1)*2 → 10.
Is there a number that multiplied by itself makes 10? If I do 3*3 I have 9, with 4*4 I have 16; it must be between 3 and 4; with 3.1*3.1 I have 9.61, ... with 3.16*3.16 I have 9.9856, with 3.17*3.17 I have 10.0489; it must be between 3.16 and 3.17; so on I can find the other digits of a number that multiplied by itself makes 10:  3.1622776602…  This number is called the square root of 10: it is the side in cm of a square that has an area of 10 cm². There is an easier way to calculate it.
The [sqr] key allows you to calculate the square root of the number placed to its right.  To have a square with an area of 130 mm², how much must its side measure?  I just need 1 digit more than millimeters.  I choose "1" as "digits after .", I click [sqr] and I get 11.4:  I can take the side of 11.4 mm (11 millimeters and 4 tenths of a millimeter).
If I put any positive number to the right of [sqr] and repeatedly press [sqr] what do I get?

How is the square root of a number calculated?
This script lets me figure it out.

square root

  

I  perimeter and area of the circle                      

J  pocket calculator                  
Third use
The [PI] key gives the number 3.141592653589793, the 17-digit approximation of the area of a circle with radius 1 (a circle with a radius of 10 centimeters has an area of 31.4159… cm²).  This number, called greek pi because it is usually written π (the "pi" of the Greek alphabet), is the number by which to multiply the diameter of a circle to get its length.  If a circle has a diameter of 37.4 cm, what is its circumference?  I calculate 37.4*3.141592653589793 rounding to tenths (I put "1" as the number of digits after the point) to get 117.5 (centimeters).
Our calculator also has the [rest] button. What does it do?  If I calculate 200/17 I get 11.7647058824;  if I rounded to the integers I would get 12;  the result truncated to the integers is 11; to get the remainder (or rest) by hand I would do:  17*11 = 187; from 187 to 200 how much is missing? 200-187 = 13.  The [rest] key does just this calculation: if I type 200, then [rest], then 17 I get 13.
At the bottom, to the right of [Help], there are the [R] and [PI] keys which enter the result just calculated or the value of π in the top box. For example, to calculate (123456+654321)*(123456+654321), calculated 123456+654321 (obtaining 777777 on the display), just add * and press the [R] key to have 777777*777777. To get 37.4*3.141592653589793 just type "37.4*" and then press the [PI] key.
   At the end of basic school you will be able to start using this more complex calculator, which also performs operations whose meaning you will discover in future years.

K  graph paper

A "sheet" of graph paper to build (by hand) graphs of
"experimental" functions (such as the weight of a person
over the years) or functions expressed by formulas.

  drawing (1)

How is a drawing done with a computer?
A simple program to get an idea of how it's done.

PEN

draw (0)
examples

drawing (2)
  How to draw on squared paper

draw (1) (draw)
draw (2) (draw2)
  

  drawing (3)   (old version)

How to draw on squared paper
using the computer (bis)

  drawing (4)   (old version)

How to draw (using the computer) on squared paper /paper without squares (for the teacher)

  drawing (4b)   on larger paper

  drawing (5)   (old version)

How to draw (using the computer) on squared paper /paper without squares (for the teacher) - larger size

 
  Polyomino

 
  Treasure Island

Indicate the steps (in the N,S,W,E directions) to reach the treasure.

L  percentages
(with our calculator I would do:  20/160*100 = 12.5)

percentage distributions

M  circle divided into cents
                      and
semicircle divided into fiftieths

      (to construct areograms)

N  sums and ratios
(I can enter the numbers directly
or increase or decrease the value
of A or B by 1)

O  sorting
 (and median)
How to order
numbers, and then how to find the datum that separates the first half of them from the second, that is the datum that is at the center of them (or immediately before, if the data are even number), that is the median?  An example:
Pupils in a 4th grade class collect the ages their parents were when they were born and the ages their grandparents were when their parents were born:
parents: 28, 36, 22, 25, 27, 44, 39, 37, 29, 26, 21, 37, 42, 39, 41, 40, 45, 24, 34, 28, 41, 32, 32, 30, 45, 24, 33, 31, 29, 34, 26, 33, 34, 28, 41, 30, 35, 37, 29, 39, 24, 33, 31, 36, 32, 32, 35, 29, 33, 47, 34, 31
grandparents: 29, 40, 33, 32, 28, 17, 37, 22, 24, 27, 44, 38, 36, 28, 26, 20, 38, 42, 37, 40, 40, 44, 24, 34, 29, 43, 23, 34, 30, 28, 32, 25, 32, 33, 27, 41, 29, 35, 38, 30, 38, 24, 32, 31, 35, 33, 31, 34, 27, 32, 47, 34, 30, 25, 35, 17, 21, 24, 46, 39, 37, 26, 22, 38, 43, 39, 42, 40, 47, 20, 33, 25, 42, 30, 30, 27, 47, 20, 31, 29, 26, 33, 22, 31, 33, 25, 42, 27, 34, 38, 26, 39, 20, 31, 29, 35, 30, 30, 34, 26, 31, 50, 33, 29

We see (with the script) that the median age is always just over 30 years old (even if the number of children per grandparent couple was once greater).  The sorting could be done by hand: you understand that it is an easy thing (I find the smallest number, I remove it from the list, I find the new smaller number, I remove it from the list, ...) and it is easy, then, to find the "median" number, but if the data are many it takes a long time:  better to use the computer.  In this way, for example, I can easily evaluate how the height of the children in a school class has changed over time, without comparing the heights of the individuals. The median is a simple concept but it is one of the most useful mathematical concepts.
    Of course, like the other scripts,
this is useful for proposing to
the pupils activities they can
practice on their own, and
check the answers without the
intervention of the teacher!
In addition to the median (32), there are also the datum that delimits the first quarter of data (27) and the datum that delimits the first 3 quarters of data (38), and their difference (11), i.e. the width of the interval where the middle half of the data is.

  ordering of words
  written in lowercase characters, separated by commas.

P  mean
The mean is an "average value" other than the median. A couple of examples.
The average of the heights of two people is the value that is halfway between them.
The average milk consumption of family members is the sum of individual consumption
divided by the number of members.
You will see in future years the usefulness of the comparison between mean and median.

Q  fractions

    simplifying fractions

Fractional calculus
is certainly not one of the most significant aspects of mathematical activity (it was several years ago, when the means of calculation were not widespread and it was important to work by hand with fractions).  However, it is important to work with ratios, to make some simplifications when needed, …  These scripts allow you to train yourself to perform some simple calculations:  try doing it by hand and compare the result with the computer.  The first does the calculation between fractions.  The second simplifies a fraction by finding the maximum integer by which the two terms are divisible (24 and 100 are both divisible by 4).  Of course it is not always useful to simplify a fraction; even in the case of the example, 24/100 is certainly more expressive than 6/25.
Faced with a "complex" calculation like the following (which I have to try to do by hand: 3/4 = 0.75,  3/4 + 0.25 = 1,  7.5 = 15/2,  15 / 2-5 / 2 = 10 / 2 = 5, …)  I can check the result  (of all or some part)  using the calculator seen above.  If I introduce  (3/4+7.5+0.25-5/2)*(3/2+7/10-1/2+4.3)  I get 36.

  3                5     3    7    1
( — + 7.5 + 0.25 - — )·( — + —— - — + 4.3 )
  4                2     2   10   2

R  divisors
To consolidate the mastery of numbers (and of the relationships between numbers) it is also useful to reflect and practice on which divisors are and  ...

S  prime factorization
  ... which of these are prime numbers.

T  sum angles of triangle                                
It is easy to deduce that the sum of the angles of a triangle is
a flat angle:  moving along the sides, I return to the initial
position by making half a turn, that is, rotating by 180°
 
    angles / sides / area of a triangle                                
It is possible to explore the links between the measurements
of the sides and angles of a triangle, explore their link with
the area of it, and conjecture the theorem proved below.
 

Calculations of areas and conjectures:   area triangles  -  area quadrangles  -  a theorem  (see)

U  Pythagoras Theorem

         
The previous figures recall cases in which 3 angles or sides are enough to
know the other dimensions of a triangle.  A special case is that in which
an angle is right:  given two sides I can easily find the third.
                     

V  the measurements are approximate                
As we recalled in point H, in practice there are not many
figures with which we can know a quantity, especially if
we "measure it".

W  parables (and lines)                  
In addition to making calculations, formulas are also used to
describe figures, such as lines and parables.   With this script I
can easily draw both lines and parabolas, after having learned to
draw them by hand (for the lines reduce "a" until it is equal to 0).

   hyperbolas (functions with hyperbolic graph,
            even without calling it that)
                 
Our class goes to visit a museum. The price for schools is €10
plus €1 for each pupil. What is the graph of individual spending
as the number of participants varies, from 1 to 20? If the price
were €5 plus €2 per pupil, up to what number of pupils would
this second rate be worth it?
 
 

X  circles    
In a similar plane, with coordinates,
I can draw circles.
I can change the position of the center
and change the radius.
 
 
 
 
    hyperbolas  (even for negative x)
 
 

Y  area trianglespolygons

     area, perimeter, center
Perimeter and area of a polygon:
we know how to calculate them by finding the measurements of the sides with the Pythagorean theorem and the area by dividing the polygon into triangles.  This script automates the process.  The script also finds the "center" of the polygon;  you can find the meaning and calculation of the "center" only in the case of rectangles and other particular polygons;  how to proceed in general you will see in subsequent school levels.

Z  histograms (starting from single data)     
We have seen in B how to draw simple histograms.  Suppose we have a sequence of unclassified data, such as the following measurements (in cm) of the lengths of a certain number of beans, measured by 12-year-old pupils.
With this script we can choose an interval in which there are data and divide it into many intervals, in order to represent how the data is distributed in these intervals.
Right what we can get.
 
A = 1   B = 2.4   intervals = 14   their width = 0.1   min=1   max=2.3
1.35, 1.65, 1.80, 1.40, 1.65, 1.80, 1.40, 1.65, 1.85, 1.40, 1.65, 1.85, 1.50, 1.65, 1.90, 1.50, 1.65, 1.90, 1.50, 1.65, 1.90, 1.50, 1.70, 1.90, 1.50, 1.70, 1.90, 1.50, 1.70, 2.25, 1.55, 1.70, 1.55, 1.70, 1.55, 1.70, 1.60, 1.70, 1.60, 1.75, 1.60, 1.75, 1.60, 1.80, 1.60, 1.80, 1.60, 1.80, 1.60, 1.80, 1.00, 1.55, 1.70, 1.75, 1.30, 1.55, 1.70, 1.75, 1.40, 1.60, 1.70, 1.75, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.45, 1.60, 1.70, 1.80, 1.50, 1.60, 1.70, 1.80, 1.50, 1.60, 1.70, 1.85, 1.50, 1.60, 1.70, 1.85, 1.50, 1.60, 1.75, 1.90, 1.50, 1.60, 1.75, 1.90, 1.50, 1.65, 1.75, 1.90, 1.55, 1.65, 1.75, 1.95, 1.55, 1.65, 1.75, 2.00, 1.55, 1.65, 1.75, 2.30, 1.35, 1.65, 1.80, 1.40, 1.65, 1.80, 1.40, 1.65, 1.85, 1.40, 1.65, 1.85, 1.50, 1.65, 1.90, 1.50, 1.65, 1.90, 1.50, 1.65, 1.90, 1.50, 1.70, 1.90, 1.50, 1.70, 1.90, 1.50, 1.70, 2.25, 1.55, 1.70, 1.55, 1.70, 1.55, 1.70, 1.60, 1.70, 1.60, 1.75, 1.60, 1.75, 1.60, 1.80, 1.60, 1.80, 1.60, 1.80, 1.60, 1.80, 1.00, 1.55, 1.70, 1.75, 1.30, 1.55, 1.70, 1.75, 1.40, 1.60, 1.70, 1.75, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.40, 1.60, 1.70, 1.80, 1.45, 1.60, 1.70, 1.80, 1.50, 1.60, 1.70, 1.80, 1.50, 1.60, 1.70, 1.85, 1.50, 1.60, 1.70, 1.85, 1.50, 1.60, 1.75, 1.90, 1.50, 1.60, 1.75, 1.90, 1.50, 1.65, 1.75, 1.90, 1.55, 1.65, 1.75, 1.95, 1.55, 1.65, 1.75, 2.00, 1.55, 1.65, 1.75, 2.30

If the data are integers, like the previous data expressed in millimetres, a much simpler script can be used,  histograms starting from integer data,  in which it is enough to enter the data without introducing other inputs:

14, 17, 18, 14, 17, 18, 14, 17, 19, 14, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 23, 16, 17, 16, 17, 16, 17, 16, 17, 16, 18, 16, 18, 16, 18, 16, 18, 16, 18, 16, 18, 10, 16, 17, 18, 13, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 15, 16, 17, 18, 15, 16, 17, 18, 15, 16, 17, 19, 15, 16, 17, 19, 15, 16, 18, 19, 15, 16, 18, 19, 15, 17, 18, 19, 16, 17, 18, 20, 16, 17, 18, 20, 16, 17, 18, 23, 14, 17, 18, 14, 17, 18, 14, 17, 19, 14, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 19, 15, 17, 23, 16, 17, 16, 17, 16, 17, 16, 17, 16, 18, 16, 18, 16, 18, 16, 18, 16, 18, 16, 18, 10, 16, 17, 18, 13, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 14, 16, 17, 18, 15, 16, 17, 18, 15, 16, 17, 18, 15, 16, 17, 19, 15, 16, 17, 19, 15, 16, 18, 19, 15, 16, 18, 19, 15, 17, 18, 19, 16, 17, 18, 20, 16, 17, 18, 20, 16, 17, 18, 23
 

other software         OTHER