Autocompletion in the Python editor

The Python script editor application now has an autocompletion feature. When users begin typing, the app will make a suggestion in gray.

  • To accept the suggestion, press the Right arrow or OK key.
  • To refuse the suggestion, press Back or just continue typing.
  • To get a new suggestion, press the Up arrow or Down arrow key.
  • All possible suggestions from the prefix entered are listed in the menu of the var key.

In the execution console, the menu of the var key displays the list of functions and global variables contained in the imported scripts.

Improvement of Python's turtle and matplotlib modules

matplotlib.pyplot

  • The plot, scatter, bar, hist and arrow functions of the matplotlib.pyplot module now take an additional argument which allows users to specify the color. For example, to display a cloud of red dots: scatter([0,1,2],[2,4,7],color="red").
  • For the plot function it is possible to write the name of the color as a third argument: plot([0,1],[2,5],"red")
  • The keywords accepted for colors are listed in the menu of the Toolbox button: Modules > matplotlib.pyplot
  • It is also possible to adjust the size of the arrow function by writing arrow(0,0,1,1,head_width=0.1)

turtle

  • The new write("text") function of the turtle module allows users to write the text placed as an argument at the position where the turtle is located.
  • The argument of the circle(r) function of turtle can now be negative: the circle is then drawn in the opposite direction.
  • In the turtle module, it is now possible to use the colormode() function. colormode(1.0) changes the color mode to 1.0 and the colors must then be defined by tuples of type (0.5,1.0,0.5) while colormode(255) changes the color mode to 255 and the colors are then defined by tuples of type (128,255,128). By default the color mode is 255.

Other improvements

  • In the Calculations application, additional results are now available for results containing units.
  • In the Calculations application, the results are displayed on the same line as the entries if space permits.
  • In the 2D edition, it is now possible to insert an element of the calculation history into the denominator of a fraction.
  • The definition of the geometric distribution has been modified to be in line with what is used in mathematics lessons.
  • In the Regressions application, it is now possible to use the y = ax model.
  • It is now possible to choose two new languages: Dutch and Italian.
  • MicroPython version has been updated (version 1.12)

Thanks

We thank the contributors who helped develop this update: Alexandre André, Jean-Baptiste Boric, Ulysse Gaspar, Joachim Le Fournis, David Meenan, Henry Meyer, Neven Sajko, Maximilian Walter and Jacob Young.