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 ?

k=2

while k<10:

k=k**2

print(k)

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

a="hello"=="Hello"

print(a==False)

0%
0%
0%
0%
View this question

Quel est le type de la variable a après l'exécution de ce code ?

a="3"

c=a

a=str(a)

a=float(a)

a=bool(a)

a=int(a)

a=c

View this question

Qu'affiche le code suivant ?

def test():

resultat="hello"

return resultat

resultat=test()

0%
0%
0%
0%
View this question

Le code suivant 

def test():

resultat="hello"

print(resultat)

affiche l'erreur suivante :

---------------------------------------------------------------------------

NameError Traceback (most recent call last)

Cell In[39], line 3

1 def test():

2 resultat="hello"

----> 3 print(resultat)

NameError: name 'resultat' is not defined

Quelle proposition permet de corriger cette erreur ?

0%
0%
0%
View this question

Qu'affiche ce code ?

def mystere(lettre,phrase):

n=len(phrase)

i=0

cpt=0

while i<n:

if lettre==phrase[i]:

cpt=cpt+1

i=i+1

return cpt

ma_phrase="truc bidule machin chouette"

ma_lettre="e"

print(mystere(ma_lettre,ma_phrase))

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

n=100

while n>6:

n=n//5

print(n)

View this question

Qu'affiche ce code ?

n=100

while n>6:

n=n//5

print(n)

View this question

Qu'affiche ce code ?

def anagramme(mot1,mot2):

n=len(mot1)

i=0

while i<n:

if mot1[i] not in mot2:

return False

i=i+1

return True

print(anagramme("niche","chien"))

0%
0%
0%
0%
View this question

Qu'affiche ce code ?

L=[2,4,1,6]

L.append(0)

print(L)

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