samedi 6 janvier 2018

Equality in code

Can someone please explain which line are executed first and how it work?

n = 5
for i in range(1,n+1):
print "*" * i
i = n + 1 

And why this code is giving the same answer:

n = 5
for i in range(1,n+1):
print "*" * i
i = i + 1 

Aucun commentaire:

Enregistrer un commentaire