0% ont trouvé ce document utile (0 vote)
16 vues3 pages

Algorithmes en TI, Casio et Scratch

Ce tutoriel présente la traduction d'instructions algorithmiques en trois langages de programmation : TI, Casio et Scratch. Il couvre les instructions de sortie, d'affectation, d'entrée, conditionnelles et itératives, avec des exemples pour chaque type d'instruction. L'objectif est d'aider à comprendre comment implémenter des algorithmes dans différents environnements de programmation.

Transféré par

ramazaniassanirams7
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd
0% ont trouvé ce document utile (0 vote)
16 vues3 pages

Algorithmes en TI, Casio et Scratch

Ce tutoriel présente la traduction d'instructions algorithmiques en trois langages de programmation : TI, Casio et Scratch. Il couvre les instructions de sortie, d'affectation, d'entrée, conditionnelles et itératives, avec des exemples pour chaque type d'instruction. L'objectif est d'aider à comprendre comment implémenter des algorithmes dans différents environnements de programmation.

Transféré par

ramazaniassanirams7
Copyright
© All Rights Reserved
Nous prenons très au sérieux les droits relatifs au contenu. Si vous pensez qu’il s’agit de votre contenu, signalez une atteinte au droit d’auteur ici.
Formats disponibles
Téléchargez aux formats PDF, TXT ou lisez en ligne sur Scribd

Algorithme et programmation 1

Bonjour à tous...
Ce tutoriel nous montre comment traduire les instructions d’un algorithme
dans trois langages de programmation : Calculatrices TI, calculatrices Casio et logiciel Scratch

➊ L’instruction de sortie

Algorithme Programmation TI Programmation Casio Programmation Scratch


créer un écran d’affichage

Disp "bonjour"
afficher "bonjour" (Display veut dire "bonjour"
afficher)
afficher A Disp A A

afficher "A=" "A="


Disp "A=" , A
afficher A A
Disp A
afficher A Disp B A
afficher B B
Disp A , B

➋ L’instruction d’affectation

Algorithme Programmation TI Programmation Casio Programmation Scratch

A ppv 3 3➞A 3➞A

A ppv A + 5 A+5➞A A+5➞A

A ppv B + C B+C➞A B+C➞A

➌ Les instructions d’entrée

Algorithme Programmation TI Programmation Casio Programmation Scratch

effacer l’écran ClrHome (ou EffEcr) ClrText


effacer aussi toutes les sous-listes

entrer A Input A ?➞A

demander "A=" Input "A=",A


entrer A "A=" ? ➞ A
Prompt A

Jean-Luc Dott 2009


Algorithme et programmation 2

➍ Les instructions conditionnelles (tests)


Si ... alors ...
Algorithme Programmation TI Programmation Casio Programmation Scratch
Si condition alors If condition
If condition
début Then
Then instruction
instruction instruction
etc...
etc... etc...
instruction
instruction instruction
If End
fin End

Si ... alors ... sinon ...


Algorithme Programmation TI Programmation Casio Programmation Scratch
Si condition alors
début If condition
instruction Then If condition
etc... instruction Then instruction
instruction etc... etc...
fin instruction instruction
Sinon Else Else instruction
début instruction etc...
instruction etc... instruction
etc... instruction If End
instruction End
fin

Exemples de conditions
Programmation Programmation
Algorithme Programmation Scratch
TI Casio
If A = 1
If A = 1
Si A =1 alors ... Then
Then ...
...
If A ≠ 2
If A ≠ 2
Si A ≠ 2 alors ... Then
Then ...
...
If A ≤ 3
If A ≤ 3
Si A ≤ 3 alors ... Then
Then ...
...
If A > B + 4
Si A > B + 4 If A > B + 4
Then
alors ... Then ...
...
If A ≤ B + C
Si A ≤ B + C If A ≤ B + C
Then
alors ... Then ...
...
C If A = 3B2 + C ÷ D
Si A = 3B2 + If A = 3B2 + C ÷ D
D Then
Then ...
alors ... ...

Jean-Luc Dott 2009


Algorithme et programmation 3

➎ Les instructions itératives (boucles)


Algorithme Programmation TI Programmation Casio Programmation Scratch
répéter indéfiniment
Lbl E Lbl E
début
instruction instruction
instruction
etc... etc...
etc...
instruction instruction
instruction
Goto E Goto E
fin

Lbl E
Lbl E
If condition
If condition
Then
Then instruction
instruction
etc...
répéter si condition etc... instruction
début instruction
Goto E
instruction Goto E
etc...
instruction While condition While condition
fin instruction
instruction
etc...
etc...
instruction
instruction
WhileEnd
End

1➞N
Lbl E 1➞N
If N ≤ 10 Lbl E
Then If N ≤ 10
instruction Then instruction
etc... etc...
instruction instruction
N+1➞N N+1➞N
Goto E Goto E

1➞N 1➞N
répéter 10 fois While N ≤ 10
While N ≤ 10
début instruction
instruction
instruction etc...
etc...
etc... instruction
instruction
instruction N+1➞N
N+1➞N
fin WhileEnd
End

For ( N , 1 , 10 , 1 ) For 1 ➞ N To 10 Step


instruction 1
etc... instruction
instruction etc...
End instruction
Next

Jean-Luc Dott 2009

Vous aimerez peut-être aussi