Skip to content

Commit

Permalink
Deployed 38da434 with MkDocs version: 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Sep 14, 2023
1 parent 237d6fa commit ca74338
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions T1_Demarrer_en_Python/1.2_Boucle_for/exercices/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3884,7 +3884,16 @@ <h1 id="exercices-sur-la-boucle-for-in">Exercices sur la boucle <code>for ... in
<p><span class="arithmatex">\(1+2+3+4+5+ \dots +999+1000\)</span></p>
<p>Écrire un programme avec une variable <code>somme</code> <strong>accumulateur</strong> (comme à l'exercice 3) qui contiendra la valeur souhaitée en fin de programme.</p>
</div>
<div class="tabbed-block"></div>
<div class="tabbed-block">
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="n">somme</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">1001</span><span class="p">):</span>
<span class="n">somme</span> <span class="o">+=</span> <span class="n">k</span>
<span class="nb">print</span><span class="p">(</span><span class="n">somme</span><span class="p">)</span>
</code></pre></div></td></tr></table></div>
</div>
</div>
</div>
</div>
Expand All @@ -3895,7 +3904,16 @@ <h1 id="exercices-sur-la-boucle-for-in">Exercices sur la boucle <code>for ... in
<div class="tabbed-block">
<p>Calculer <span class="arithmatex">\(1\times 2 \times 3 \times \dots 99 \times 100\)</span>.</p>
</div>
<div class="tabbed-block"></div>
<div class="tabbed-block">
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal">1</span>
<span class="normal">2</span>
<span class="normal">3</span>
<span class="normal">4</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="n">produit</span> <span class="o">=</span> <span class="mi">1</span>
<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">100</span><span class="p">):</span>
<span class="n">produit</span> <span class="o">=</span> <span class="n">produit</span> <span class="o">*</span> <span class="n">k</span>
<span class="nb">print</span><span class="p">(</span><span class="n">produit</span><span class="p">)</span>
</code></pre></div></td></tr></table></div>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit ca74338

Please sign in to comment.