From cb56e254da2f0dd96e91f907db7aad629670e576 Mon Sep 17 00:00:00 2001 From: Lyanis Souidi Date: Sat, 20 May 2023 18:05:13 +0200 Subject: [PATCH] =?UTF-8?q?[Ex3=20-=20Q5]=20Ajout=20d=C3=A9but=20de=20r?= =?UTF-8?q?=C3=A9ponse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il manque la réponse à la fin de la question : "Cela est-il conforme à l’hypothèse d’un taux d’accroissement constant ? Justifier." --- README.md | 1 + ex3/README.md | 17 +++++++++++++++++ ex3/scripts/ex3-5.sce | 4 ++++ 3 files changed, 22 insertions(+) create mode 100644 ex3/scripts/ex3-5.sce diff --git a/README.md b/README.md index 0de5d2e..28d7bf3 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,4 @@ Les réponses aux questions des exercices sont situées dans les README des doss 2. [Pays ayant un taux d'accroissement négatif](ex3/#q2) 3. [Moyenne](ex3/#q3) 4. [Moyenne par continent](ex3/#q4) + 5. [Estimation de la population mondiale en 2050](ex3/#q5) diff --git a/ex3/README.md b/ex3/README.md index 5f3ae54..703ccab 100644 --- a/ex3/README.md +++ b/ex3/README.md @@ -7,6 +7,7 @@ 2. [Pays ayant un taux d'accroissement négatif](#q2) 3. [Moyenne](#q3) 4. [Moyenne par continent](#q4) +5. [Estimation de la population mondiale en 2050](#q5) --- @@ -93,6 +94,22 @@ bar(tauxAccroissementMoyenParContient) ![Taux d'accroissement moyen par continent](img/ex3-4.png) +--- + +## Question 5 : Estimation de la population mondiale en 2050 {#q5} + +> Quelle est la population mondiale prévue en 2050 ? Cela est-il conforme à l’hypothèse d’un taux d’accroissement constant ? Justifier. + +**[Script Scilab](scripts/ex3-5.sce) :** + +```scilab +population2050 = sum(data(:, 6)*1000000) +``` + +**Résultat :** + +- La population mondiale prévue en 2050 est de 9 848 330 000 habitants. + --- diff --git a/ex3/scripts/ex3-5.sce b/ex3/scripts/ex3-5.sce new file mode 100644 index 0000000..9144790 --- /dev/null +++ b/ex3/scripts/ex3-5.sce @@ -0,0 +1,4 @@ +data = csvRead("data.csv"); + +population2050 = sum(data(:, 6)*1000000); +mprintf("La population mondiale prévue en 2050 est de %.0f habitants.\n", population2050);