Apprendre Python - UPDATE 1.4-tp-bisextile.py: bonus perso hors énoncé
This commit is contained in:
parent
4985219cbe
commit
d03d0a4d1f
|
@ -16,3 +16,13 @@ elif (annee % 4) == 0 and (annee % 100) != 0:
|
|||
else:
|
||||
print(annee," n'est PAS bisextile.")
|
||||
liste = []
|
||||
|
||||
# La suite ne fait pas parti du TP: bonus perso
|
||||
|
||||
print("Voici la liste des annees bisextiles entre 1900 & 2030 :")
|
||||
|
||||
for a in range(1900,2030):
|
||||
if ((a % 400) == 0) or ((a % 4) == 0 and (a % 100) != 0):
|
||||
liste.append(a)
|
||||
|
||||
print(liste)
|
||||
|
|
Loading…
Reference in New Issue