Vous ne trouvez pas que Python est assez lent?
Je suis novice en Python et je programme peut-être très très mal mais voilà par exemple ce code:
... va durer une éternité pour trouver la réponse!... Mais elle va sortir!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 def nb(): nbre,notFound=1,True while notFound: print "bcl1 " , notFound divStart,divEnd=1,20 divisible=True while divisible and divStart <= divEnd: print " bcl2 ",divisible, " -- nbre=",nbre, " divStart=",divStart," - divEnd=",divEnd if nbre % divStart == 0: divStart += 1 else: divisible = False print " ---- after while ", divisible if divisible == True: notFound = False print " found ", nbre else: nbre+=1 nb()
Partager