avkLab

Bissextile

Jun 10th, 2022
1,169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #----------------------------------------------------------------------------
  4. # Created by  : Alain Van Kerckhoven
  5. # Created Date: 3 avril 2017
  6. # Licence     : GPL
  7. # Version     : 1.0
  8. # ---------------------------------------------------------------------------
  9. """
  10. Programme testant si une année saisie est bissextile
  11. """
  12. # ---------------------------------------------------------------------------
  13.  
  14. annee = input("Saisissez une année : ")
  15. annee = int(annee)
  16.  
  17. if annee % 400 == 0 or (annee % 4 == 0 and annee % 100 != 0):
  18.     print("L'année saisie est bissextile.")
  19. else:
  20.     print("L'année saisie n'est pas bissextile.")
  21.    
  22.  
Advertisement
Add Comment
Please, Sign In to add comment