This commit is contained in:
divingeek 2025-08-26 18:38:28 +02:00
parent 3ad9ff1140
commit eb3c7313c5
199 changed files with 10833 additions and 0 deletions

342
C1/c1.html Normal file
View file

@ -0,0 +1,342 @@
<!DOCTYPE html>
<html lang="fr"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="c1_fichiers/github.css">
<link rel="stylesheet" href="c1_fichiers/style.css">
<script src="c1_fichiers/highlight.pack.js"></script>
<script>
hljs.highlightAll();
</script>
<title>BNS première NSI</title>
<style>:is([id*='google_ads_iframe'],[id*='taboola-'],.taboolaHeight,.taboola-placeholder,#top-ad,#credential_picker_container,#credentials-picker-container,#credential_picker_iframe,[id*='google-one-tap-iframe'],#google-one-tap-popup-container,.google-one-tap__module,.google-one-tap-modal-div,#amp_floatingAdDiv,#ez-content-blocker-container) {display:none!important;min-height:0!important;height:0!important;}</style></head>
<body>
<header>
<nav>
<img src="c1_fichiers/menu.svg">
</nav>
<h2>BNS PREMIERE NSI</h2>
</header>
<aside>
<ul>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c1.html">CHAPITRE 1</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c2.html">CHAPITRE 2</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c3.html">CHAPITRE 3</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c4.html">CHAPITRE 4</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c5.html">CHAPITRE 5</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c6.html">CHAPITRE 6</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c7.html">CHAPITRE 7</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c8.html">CHAPITRES 8 et 9</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c14.html">CHAPITRES 13 et 14</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c15.html">CHAPITRE 15</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c20.html">CHAPITRES 16, 17, 18, 19 et 20</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c28.html">CHAPITRES 21, 22, 23, 24, 25, 26, 27 et 28</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c29.html">CHAPITRE 29</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c32.html">CHAPITRES 10, 11, 12, 30, 31 et 32</a></li>
<li><a href="https://pixees.fr/informatiquelycee/prem/bns/bns_c33.html">CHAPITRE 33</a></li>
</ul>
</aside>
<div class="content">
<h2>QUESTIONS CHAPITRE 1</h2>
<p>
Q1 - Parmi les quatre expressions suivantes, laquelle s'évalue en True ?
</p>
<p>
Réponses :
</p>
<p>
A- False and (True and False)
</p>
<p>
B- False or (True and False)
</p>
<p>
C- True and (True and False)
</p>
<p>
<span class="ok"> D- True or (True and False)</span>
</p>
<hr>
<p>
Q2 - Si a vaut False et b vaut True, que vaut lexpression booléenne NOT(a AND b) ?
</p>
<p>
Réponses :
</p>
<p>
A- 0
</p>
<p>
B- False
</p>
<p>
<span class="ok">C- True</span>
</p>
<p>
D- None
</p>
<hr>
<p>
Q3 - On exécute le code suivant
</p>
<pre><code class="python hljs">
a = <span class="hljs-number">2</span>
b = <span class="hljs-number">3</span>
c = a ** b
d = c % b
</code></pre>
<p>
Quelle est la valeur de d à la fin de l'exécution ?
</p>
<p>
Réponses :
</p>
<p>
A- 1
</p>
<p>
<span class="ok">B- 2</span>
</p>
<p>
C- 3
</p>
<p>
D- 4
</p>
<hr>
<p>
Q4 - La variable x contient la valeur 3, la variable y contient la variable 4.
Quelle expression s'évalue en True parmi les quatre propositions suivantes ?
</p>
<p>
Réponses :
</p>
<p>
<span class="ok">A- x == 3 or y == 5</span>
</p>
<p>
B- x == 3 and y == 5
</p>
<p>
C- x != 3 or y == 5
</p>
<p>
D- y &lt; 4
</p>
<hr>
<p>
Q5 - À quelle affectation sont équivalentes les instructions
suivantes, où a, b sont des variables entières et c une variable
booléenne ?
</p>
<pre><code class="python hljs">
<span class="hljs-keyword">if</span> a==b:
c = <span class="hljs-literal">True</span>
<span class="hljs-keyword">elif</span> a &gt; b+<span class="hljs-number">10</span>:
c = <span class="hljs-literal">True</span>
<span class="hljs-keyword">else</span>:
c = <span class="hljs-literal">False</span>
</code></pre>
<p>
Réponses :
</p>
<p>
<span class="ok">A- c = (a==b) or (a &gt; b+10)</span>
</p>
<p>
B- c = (a==b) and (a &gt; b+10)
</p>
<p>
C- c = not(a==b)
</p>
<p>
D- c = not(a &gt; b+10)
</p>
<hr>
<p>
Q6 - Sachant que l'expression not(a or b) a la valeur True,
quelles peuvent être les valeurs des variables booléennes a et b&nbsp;?
</p>
<p>
Réponses :
</p>
<p>
A- True et True
</p>
<p>
B- False et True
</p>
<p>
C- True et False
</p>
<p>
<span class="ok">D- False et False</span>
</p>
<hr>
<p>
Q7 - On considère une formule booléenne form des variables booléennes a et b dont voici la table de vérité.
</p>
<table>
<tbody><tr>
<th>a</th>
<th>b</th>
<th>form</th>
</tr>
<tr>
<td>True</td>
<td>True</td>
<td>False</td>
</tr>
<tr>
<td>False</td>
<td>True</td>
<td>False</td>
</tr>
<tr>
<td>True</td>
<td>False</td>
<td>True</td>
</tr>
<tr>
<td>False</td>
<td>False</td>
<td>False</td>
</tr>
</tbody></table>
<p>
Quelle est cette formule booléenne form ?
</p>
<p>
Réponses :
</p>
<p>
A- a and b
</p>
<p>
B- a or b
</p>
<p>
<span class="ok">C- a and not(b)</span>
</p>
<p>
D- not(a) or b
</p>
<hr>
<p>
Q8 - Pour quelles valeurs booléennes des variables a, b et c
l'expression (a or b) and (not c) a-t-elle pour valeur True ?
</p>
<p>
Réponses :
</p>
<p>
A- a = True b = False c = True
</p>
<p>
<span class="ok">B- a = True b = False c = False</span>
</p>
<p>
C- a = False b = False c = True
</p>
<p>
D- a = False b = True c = True
</p>
<hr>
<p>
Q9 - Soient a et b deux booléens. Lexpression booléenne NOT(a AND b) OR a est équivalente à :
</p>
<p>
Réponses :
</p>
<p>
A- False
</p>
<p>
<span class="ok">B- True</span>
</p>
<p>
C- NOT(b)
</p>
<p>
D- NOT(a) OR NOT(b)
</p>
<hr>
<p>
Q10 - Si A et B sont des variables booléennes, laquelle de ces expressions booléennes est équivalente
à (not A) or B ?
</p>
<p>
Réponses :
</p>
<p>
A- (A and B) or (not A and B)
</p>
<p>
<span class="ok">B- (A and B) or (not A and B) or (not A and not B)</span>
</p>
<p>
C- (not A and B) or (not A and not B)
</p>
<p>
D- (A and B) or (not A and not B)
</p>
<hr>
<p>
Q11 - On considère l'extrait de code suivant :
</p>
<pre><code class="python hljs">
<span class="hljs-keyword">while</span> (a &lt; <span class="hljs-number">20</span>) <span class="hljs-keyword">or</span> (b &gt; <span class="hljs-number">50</span>):
......
......
</code></pre>
<p>
Quelles conditions permettent de mettre fin à cette boucle ?
</p>
<p>
Réponses :
</p>
<p>
A- la boucle prend fin lorsque a &lt; 20 ou b &gt;50
</p>
<p>
B- la boucle prend fin lorsque a &lt; 20 et b &gt; 50
</p>
<p>
C- la boucle prend fin lorsque a &gt;= 20 ou b &lt;= 50 </p>
<p>
<span class="ok">D- la boucle prend fin lorsque a &gt;= 20 et b &lt;= 50</span>
</p>
<hr>
<p>
Q12 - Quelle est la valeur de x à la fin de l'exécution du script Python suivant ?
</p>
<pre><code class="python hljs">
x = <span class="hljs-number">1</span>
<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">10</span>):
x = x * <span class="hljs-number">2</span>
</code></pre>
<p>
Réponses :
</p>
<p>
A- 2
</p>
<p>
<span class="ok">B- 1024</span>
</p>
<p>
C- 2048
</p>
<p>
D- 20000000000
</p>
<hr>
</div>
<script src="c1_fichiers/script.js"></script>
</body></html>