Ex2.2

De TravauxIndse

Solutions de cet exercices :

  • Solution de Kévin Detaille :
import random
random.random() 
t1=[]
for i in range(1000):
        t1.append(random.randint(100,999))
t2=[]
for i in range(1000):
        t2.append(random.randint(100,999))
a,b,i,identique=0,0,0,(len(t1)==len(t2))
if(identique):
        print(identique)
else:
        while i<len(t1) and i<len(t2) and a==0:
                b=(t1[i]==t2[i])
                if(b)and(c):
                        identique=True
                        print(identique)
                        print(b)
                else:
                        identique=False
                        a=1
                        print(b)