Python Century From Year
import math
def century_from_year(year: int) -> int:
return math.ceil(year / 100)
This converts a year into its century. Years 1-100 are century 1, 101-200 are century 2, and so on.
import math
def century_from_year(year: int) -> int:
return math.ceil(year / 100)
This converts a year into its century. Years 1-100 are century 1, 101-200 are century 2, and so on.