logo

Crowdly

Browser

Add to Chrome

2526-B1-UE12-Base d'un langage informatique

Looking for 2526-B1-UE12-Base d'un langage informatique test answers and solutions? Browse our comprehensive collection of verified answers for 2526-B1-UE12-Base d'un langage informatique at moodle.ensea.fr.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Qu'affiche ce code ?

L=[2,4,1,6]

L.append(0)

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

def est_premier(n):

for i in range(2,n):

if n%i==0:

return False

return True

def premiers_jumeaux(p,q):

if est_premier(p) and est_premier(q) and (p-q==2 or p-q==-2):

return True

return False

print(premiers_jumeaux(3,5))

print(premiers_jumeaux(7,9))

0%
0%
0%
View this question

Qu'affiche ce code ?

def est_premier(n):

for i in range(2,n):

if n%i==0:

return False

return True

def liste_div_premiers(n):

Res=[]

for d in range(2,n):

if est_premier(d) and n%d==0:

Res.append(d)

return Res

L=liste_div_premiers(30)

print(L)

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

def inconnu(lettre,mot):

n=len(mot)

for i in range(n):

if lettre==mot[i]:

return True

return False

mon_mot="trucbidulechouette"

ma_lettre="c"

print(inconnu(ma_lettre,mon_mot))

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

L=[]

for i in range(2,10):

if i%3==0:

L.append(i)

print(L)

View this question

Qu'affiche ce code ?

def mystere(n):

for d in range(2,n):

if n%d==0:

return False

return True

print(mystere(13))

View this question

Qu'affiche le code ?

def fct(x):

return x**2

print(fct(-3.))

View this question

Qu'affiche ce code ?

def fct(x):

return x**2

print(type(fct(-3.)))

View this question

Qu'affiche le code suivant ?

def fct(x):

return x**2

print(type(fct(-3)==9))

View this question

Qu'affiche le code suivant ?

def fct(x):

return x**2

print(fct(-3))

0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.ensea.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome