Feat(NSI): V1 du devoir
This commit is contained in:
5
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_f.py
Normal file
5
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_f.py
Normal file
@@ -0,0 +1,5 @@
|
||||
def f(x, y):
|
||||
x = x + y
|
||||
y = x - y
|
||||
x = x - y
|
||||
return (x, y)
|
3
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_for.py
Normal file
3
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_for.py
Normal file
@@ -0,0 +1,3 @@
|
||||
n = 1
|
||||
for i in range(4):
|
||||
n = n + 2
|
10
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_if.py
Normal file
10
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_if.py
Normal file
@@ -0,0 +1,10 @@
|
||||
a = 3
|
||||
b = 4
|
||||
if a > b and a == 3:
|
||||
print('vert')
|
||||
if a > b and b == 4:
|
||||
print('rouge')
|
||||
if a == 4 or b > a:
|
||||
print('bleu')
|
||||
if a == 3 or a < b:
|
||||
print('jaune')
|
5
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_while.py
Normal file
5
1NSI/Evaluations/DS_2023-01-09/annexes/QCM_while.py
Normal file
@@ -0,0 +1,5 @@
|
||||
compt = 0
|
||||
resultat = 1
|
||||
while compt !=7:
|
||||
resultat = resultat * compt
|
||||
compt = compt + 1
|
Reference in New Issue
Block a user