SUJET BAC NSI 8
Cours : SUJET BAC NSI 8. Recherche parmi 301 000+ dissertationsPar Fanny0605 • 3 Mars 2024 • Cours • 321 Mots (2 Pages) • 118 Vues
TAB5=[i for i in range (0,101,5)]
print(TAB5)
T53=[i for i in TAB5 if(i%3==0)]
print(T53)
maliste=[[randint (0,10),randint(0,10)] for i in range(10)]
print(maliste)
exo 1
mesNotes =[10, 14, 8, 16, 15]
mesNotes.sort()
print(mesNotes)
exo2
mesNotes =[10, 14, 8, 16, 15]
mesNotes.sort(reverse=True)
print(mesNotes)
mesNotes= [10, 14, 8, 16, 15]
def maMoy(mesNotes):
nb_notes= (len(mesNotes)
maMoy1= sum(mesNotes)/nb_notes
return maMoy1
def ex1_3(mesNotes):
n = 0
for i in mesNotes:
n = n + I
return n/len(mesNotes)
phrase1="Julie vend quatre ceintures"
phrase2="Vladimir aime follement repartir nager"
def decode(phrase):
phrase=phrase.split()
rep=[]
for i in range(len(phrase)):
L.append(phrase[i][i])
return L
tup=('a','c','y','e','z','f')
tup=tup[:4]+tup[-1:]
tup=tup[:2]+('d',)+tup[-2:]
tup=(tup[:1])+('b',)+tup[-4:]
print (tup)
from random import randint
tup=()
for i in range(35):
tup=tup+(randint(1,365),)
print (tup)
def testDouble(T):
test=False
for i in T:
if T.count(i)>=2:
test = True
return test
monTuple=(10,14,12,14)
a,b,c,d=monTuple
monTuple=(10,14,12,14)
a,b,c,d=monTuple
monTuple2=()
for
...