mercredi 3 janvier 2018

Did not understand the outputs

My code:

num = 5
if num > 2:  
    print(num)
    num -= 1
print(num)

Expected output:

5,4,3,2

Actual output:

5,4

Question: Why do I receive the actual output and not the expected output?

Aucun commentaire:

Enregistrer un commentaire