We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4f6745 commit 5cf180aCopy full SHA for 5cf180a
exercises/016-century/solution.hide.py
@@ -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.
3
import math
+
+# Complete the function to return the respective number of the century
4
def century(year):
5
if year % 100 == 0:
6
return math.floor(year/100)
7
else:
8
return math.floor(year/100 +1)
9
10
11
-
12
-#Invoke the function with any given year.
13
-print(century(2022))
+# Invoke the function with any given year
+print(century(2024))
0 commit comments