A Comparison of Algorithmique vs. Python Turtle (Casio fx-92
Collège vs. Numworks)
The
Casio fx-92 Collège from France has an algorithm mode, which is
essentially a program mode. The language is designed to be an
easy-to-use program and can be viewed online as Scratch program code.
I would love to see Casio sell this calculator world wide instead
on just France, I think this calculator would give an excellent
introduction to coding (at any age).
On
today’s blog, I’m going to compare the Algorithmique programming
language to Python’s Turtle module in drawing three simple shapes.
The calculator I’m using for Python is Numworks. I’m
forever grateful to Google Translate, as I am not fluent in French.
The
Commands
Casio fx-92 Collège Algorithmique French
|
Casio fx-92 Collège Algorithmique French
|
Python Turtle Command (Numworks)
|
Python Built-In Command
|
Avancer de n
|
Move forward n
|
forward(n)
|
|
Tourner de ⟲ Θ
|
Turn from ⟲ Θ
|
Θ > 0: left(Θ)
Θ < 0: right(Θ)
|
|
S’ orienter à Θ
|
Orient yourself to Θ
|
setheading(Θ)
|
|
Aller à x; y
|
Go to x; y
|
goto(x,y)
|
|
Stylo écrit
|
Pen writes
|
pendown()
|
|
Stylo relevè
|
Pen raised
|
penup()
|
|
Metire var á
(Shown as expression → var)
|
Set var to
(Shown as expression → var)
|
|
var = expression
|
Demander valeur
(Shown as ? → var)
|
Ask for a value
(Shown as ? → var)
|
|
var = input(“optional prompt string” )
[float, eval, int, default is a string]
|
Commenataire
(shown as one of four comments)
|
Comment out of four per-programmed strings
|
|
print(“almost anything you want”)
|
Afficher résult var
|
Show result var
|
|
print(var)
|
Style
|
Style (Style of Cursor)
|
Turtle has a turtle character. Show or hide by
showturtle()/hideturtle()
|
|
Attendre
|
Pause
|
N/A
|
N/A (though we can use an artificial for loop that does nothing)
|
Répéter n ( ↑ )
|
Repeat n ( ↑ )
|
|
For i in range(n):
|
Répéter jusqúa cond
|
Repeat until cond
|
|
While (not cond):
|
Si Alors (Fin)
|
If Then (End)
|
|
If: structure
|
Si Alors Sinon (Fin)
|
If Then Else (End)
|
|
If: Else: structure
|
The
four per-programmed strings are:
“Oui” Yes
“Non” No
“Nombre?” Number?
“Résultat :”
Result :
Using a per-programmed
string pauses the algorithm and requires a press of either [ OK ] or
[ EXE ] to continue.
The
fx-92 Collège offers to styles of cursors: Arrows (Fléche) or
Cross (Criox)
The
pixel screen of the fx-92 Collège is 191 x 48 pixels, with the x
coordinates ranging from -95 to 96 and the y coordinates raging from
-24 to 48.
The
pixel screen (Turtle) for the Numworks is 320 x 222 pixels, with the
x coordinates ranging from -160 to 160 and the y coordinates ranging
from -111 to 111.
Drawing
a Square
fx-92
Collège:
?
→A
Stylo
relevé
Avancer
de A÷2 pixels
Stylo
écrit
Tourner
de ⟲ 90 degrés
Avancer
de A÷2 pixels
Répéter 3
Tourner
de ⟲ 90 degrés
Avancer
de A pixels
↑
Tourner
de ⟲ 90 degrés
Avancer
de A pixels
Numworks:
from math import *
from turtle import *
print("Draw a Square")
s=eval(input("side length? "))
penup()
forward(s/2)
pendown()
left(90)
forward(s/2)
for i in range(3):
left(90)
forward(s)
left(90)
forward(s/2)
Drawing
a Triangle
fx-92
Collège:
?
→A
?
→B
Stylo
relevé
Aller
à x= -A÷2 ;
y= -B÷2
Stylo
écrit
Aller
à x= A÷2 ; y= -B÷2
Aller
à x= 0 ; y= B÷2
Aller
à x= -A÷2 ;
y= -B÷2
Numworks:
from math import *
from turtle import *
print("Draw a Triangle")
s=eval(input("base? "))
h=eval(input("height? "))
penup()
goto(-s/2,-h/2)
pendown()
goto(s/2,-h/2)
goto(0,h/2)
goto(-s/2,-h/2)
Drawing
a Circle
fx-92
Collège:
?
→A
Stylo
relevé
Aller
à x= A ; y= 0
Stylo
écrit
0 →z
Répéter 120
z+3 →z
Aller
à x= A×cos(z°) ; y= A×sin(z°)
↑
Numworks:
from math import *
from turtle import *
print("Draw a Circle")
r=eval(input("radius? "))
penup()
right(90)
forward(r)
left(90)
pendown()
circle(r)
The Algorithmique (similar to Scratch) and Turtle language is comparable and these examples demonstrates similarities and differences of both languages.
Source
Casio.
“Algorithmque/Programmation” (French)
https://www.casio-education.fr/algorithmique-programmation/
Retrieved January 26, 2025
Eddie
All
original content copyright, © 2011-2025. Edward Shore.
Unauthorized use and/or unauthorized distribution for commercial
purposes without express and written permission from the author is
strictly prohibited. This blog entry may be distributed for
noncommercial purposes, provided that full credit is given to the
author.