Annales du baccalauréat - Session 2021 - DNL mathématiques-anglais avec mention « section européenne »
Problématique : Mathématiques, monde de l’économie, développement durable
Thèmes : algorithme, déforestation
Text
In 2020, a country had approximately 100,000 hectares of forests. Every decade, it is estimated that the number of hectares of forests will decrease by 20%. In order to slow down this deforestation, a non-governmental organisation (NGO) has decided to plant 3,000 hectares of trees every decade.
How many hectares of forests will there be in 2030? 2040?
Here is a function written in Python ($n$ is the number of decades):
def forest(n):
h = 100000
for k in range(n):
h = h * 0.8 + 3000
return h
Explain the algorithm.
Run the algorithm step by step for $n = 3$
Complete the following algorithm to find the year when the number of hectares of forests will go below 30,000 for the first time. Explain.
def year():
n = 0
h = 100000
while h ...
n = n + ...
h = ...
return 2020 + ...