Page 1 of 3
Traduction en TI

Posted:
25 Oct 2014, 11:04
by princesse
Hello ! Je n'arrive pas à traduire ce programme en langage TI aidez moi svp c'est pour un DM de Mathématiques !!
Saisir n.
R[1]=1
Pour i allant de 2 à n
Simuler un aléa entre 0 et 1 et le stocker dans X
Si R[i-1], Alors
Si X ≤ 2/5, Faire R[i]=1 Sinon, R[i]=0
Si R[i-1]=0, alors
Si X≤ 1/5, Faire R[i]=1 Sinon, R[i]=0
Afficher R
Afficher la moyenne de R
J'ai :
Prompt n
...
For(I,2,n)
...
...
If X≤2/5 ...
...
If X≤1/5 ...
Disp R
DiSP ...
Merci !
Re: Traduction en TI

Posted:
25 Oct 2014, 11:17
by critor
Salut.
Voici :
Calculatrice en français : | Calculatrice en anglais : |
- Code: Select all
Prompt N 1->L1(1) For(I,2,N) NbrAléat->X If L1(I-1) Then If X≤2/5 Then 1->L1(I) Else 0->L1(I) End Else If X≤1/5 Then 1->L1(I) Else 0->L1(I) End End End Disp R Disp somme(L1)/N
| - Code: Select all
Prompt N 1->L1(1) For(I,2,N) rand->X If L1(I-1) Then If X≤2/5 Then 1->L1(I) Else 0->L1(I) End Else If X≤1/5 Then 1->L1(I) Else 0->L1(I) End End End Disp R Disp sum(L1)/N
|
Re: Traduction en TI

Posted:
25 Oct 2014, 11:18
by Lionel Debroux
En BASIC TI-Z80, "simuler un aléa" se fait avec quelque chose comme rand(, et les assignations de la forme x=y s'écrivent y -> x, "->" étant le résultat de la touche STO.
Re: Traduction en TI

Posted:
25 Oct 2014, 11:24
by princesse
Merci mais le soucis c'est que j'ai une TI-83 Plus ...
Re: Traduction en TI

Posted:
25 Oct 2014, 11:33
by critor
Et ?
Le programme que je t'ai donné est bien en langage TI-83 Plus.
Re: Traduction en TI

Posted:
25 Oct 2014, 11:34
by princesse
Merci ! Où puis-je trouver le "somme" dans la calculatrice ?? ^^'
De plus je ne comprend pas trop ce que représente la simulation R ? :/
Et la moyenne R c'est bien la probabilité d'un événement ?
Re: Traduction en TI

Posted:
25 Oct 2014, 11:36
by critor
Re: Traduction en TI

Posted:
25 Oct 2014, 11:44
by princesse
Est-ce possible de trouver :
n=10 :
1
8,516
???
Re: Traduction en TI

Posted:
25 Oct 2014, 12:39
by critor
Non.
Les 'L1' sont en fait à saisir avec
![[1] :f92:](./images/smilies/z80/92.png)
et donnent à l'écran 'L
1'.
Re: Traduction en TI

Posted:
25 Oct 2014, 13:09
by princesse
Pourquoi c'est faux ? Que faut-il insérer dans la liste L1 ?