Created
September 11, 2019 00:35
-
-
Save flfelipelopes/a133916cee03e63f22a6d6f90f7c45a8 to your computer and use it in GitHub Desktop.
Cálcula se determinado ano é bissexto ou não.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Descubra se o ano informado é bissexto ou não | |
print('=====ESSE É UM ANO BISSEXTO?=====') | |
print('') | |
print('Vamos descobrir se um determinado ano é bissexto ou não?') | |
ano = int(input('Para isso, digite um ano aleatório (4 digitos): ')) | |
print('') | |
if ano % 4 == 0 and ano % 100 != 0 or ano % 400 == 0: | |
print('O ano de {} é um ano bissexto.'.format(ano)) | |
else: | |
print('O ano de {} não é um ano bissexto.'.format(ano)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment