Created
September 14, 2017 02:13
-
-
Save dalejandroramirez/64afe02eb92c435e77580d76a7764553 to your computer and use it in GitHub Desktop.
dado un año devuelve el siglo en que se encuentra. El primer siglo se extiende desde el año 1 hasta el año 100 inclusive, el segundo - desde el año 101 hasta el año 200 incluido, etc.
This file contains hidden or 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
def centuryFromYear(year): | |
m=year/100 | |
if year%100==0: | |
return(year/100) | |
else: | |
return(int(m)+1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment