Skip to content

Commit 5cf180a

Browse files
authored
Update solution.hide.py
1 parent d4f6745 commit 5cf180a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
#Complete the function to return the respective number of the century
2-
#HINT: You may need to import the math module.
31
import math
2+
3+
# Complete the function to return the respective number of the century
44
def century(year):
55
if year % 100 == 0:
66
return math.floor(year/100)
77
else:
88
return math.floor(year/100 +1)
99

1010

11-
12-
#Invoke the function with any given year.
13-
print(century(2022))
11+
# Invoke the function with any given year
12+
print(century(2024))

0 commit comments

Comments
 (0)