Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Introduction
- The first century spans from the year 1 up to and including the year 100
- The second - from the year 101 up to and including the year 200, etc.
- '''
- def century(year):
- remaining = year % 100
- if remaining == 0:
- return int(year / 100)
- else:
- return int(year / 100) + 1
- # Main Function
- print(century(1900))
- print(century(1905))
- print(century(60))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement