Sujet Progress:

On souhaite estimer le nombre de lancer nécessaires pour sortir toutes les faces d’un dé à cix faces, bien équilibré.

Ecrire un algorithme qui simule 1000 fois une experience qui consiste à compter le nombre de lancer nécessaires pour que toutes les faces soient sorties une fois au moins.

 

 

 

 

Variables

Mathplace quicklatex.com-e25ac457c3d2ad211639eb1f49c97221_l3 Exercice 8 :  algorithme  : tabeau d’entiers

Mathplace quicklatex.com-f1b964dd4ca19e6c8a0fc2f83c6a1f7e_l3 Exercice 8 :  algorithme  : entiers

Initialisation

Mathplace quicklatex.com-68ba7a600f8e289112c690562378fca5_l3 Exercice 8 :  algorithme  initialisé à 0

Traitement

pour Mathplace quicklatex.com-5e2d10ed2cfea6b7ca90cc035d64360c_l3 Exercice 8 :  algorithme  de 1 à  1000

Mathplace quicklatex.com-e25ac457c3d2ad211639eb1f49c97221_l3 Exercice 8 :  algorithme  vidé

Mathplace quicklatex.com-74a6b78616232477caa06be9a66cc6ce_l3 Exercice 8 :  algorithme

tant que Mathplace quicklatex.com-55be9ad3441bf8ecbc9fc03a1c239b4a_l3 Exercice 8 :  algorithme

Mathplace quicklatex.com-5ca39e9d8569c72f600d23f79f64221c_l3 Exercice 8 :  algorithme

Mathplace quicklatex.com-fc0264d13e954ea4b825a5cd043af0cf_l3 Exercice 8 :  algorithme  nombre aléatoire de 1 à 6

Mathplace quicklatex.com-9951c7ff5fbf53f3258df9e7da665f6c_l3 Exercice 8 :  algorithme

pour Mathplace quicklatex.com-3b8affa7af0b01fd56bf3b3eed5f262f_l3 Exercice 8 :  algorithme  de 1 à 6

si Mathplace quicklatex.com-ee2cbb57fbcc36c03680b76af7a1616f_l3 Exercice 8 :  algorithme  , alors Mathplace quicklatex.com-a300e1de065c9c5953aa8f854f997ea3_l3 Exercice 8 :  algorithme

Fin si

Fin pour

si Mathplace quicklatex.com-5104edf14bc1243c5ad6f8cf5455e6d9_l3 Exercice 8 :  algorithme  alors

Mathplace quicklatex.com-fb11e96a40961d85bb1c6ab97b345958_l3 Exercice 8 :  algorithme  ;

Mathplace quicklatex.com-841bf68ac529fff41ace3776054a99c0_l3 Exercice 8 :  algorithme

Fin si

Fin tant que

Fin pour

Sortie

afficher Mathplace quicklatex.com-5896e609ef367f1495488f6aad2b44c6_l3 Exercice 8 :  algorithme